34. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/29/2018 12:14:33 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

34.1 Files compared

# Location File Last Modified
1 mobile-kidney-web-2.0.0.zip\mobile-kidney-web\acceptance_test\watir\spec\kidney-tracker Weight_Add_Edit_Delete_DCKDA_502_spec.rb Wed Apr 4 20:16:46 2018 UTC
2 mobile-kidney-web-2.0.0.zip\mobile-kidney-web\acceptance_test\watir\spec\kidney-tracker Weight_Add_Edit_Delete_DCKDA_502_spec.rb Tue May 29 15:48:54 2018 UTC

34.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 612
Changed 1 4
Inserted 0 0
Removed 0 0

34.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

34.4 Active regular expressions

No regular expressions were active.

34.5 Comparison detail

  1   #!/bin/env  ruby
  2   # encoding : utf-8
  3  
  4   require 'r ubygems'
  5   require 'r spec'
  6   require 'w atir-webdr iver'
  7   require 'n et/http'
  8   require 'u ri'
  9  
  10   require_re lative '.. /rspec_hel per'
  11   require_re lative '.. /../lib/pa ges/left_s ide_nav'
  12   require_re lative '.. /../lib/pa ges/common _elements'
  13   require_re lative '.. /../lib/pa ges/common _tests'
  14   require_re lative '.. /../lib/pa ges/modal_ dialog'
  15   require_re lative '.. /../lib/pa ges/filter s'
  16   require_re lative '.. /../lib/pa ges/error_ validation s'
  17   require_re lative '.. /../lib/pa ges/tracke rs_list_an d_detail'
  18   require_re lative '.. /../lib/mo dule/FHIRO perationsM odule'
  19  
  20   describe ' Story#DCKD A-502 Weig ht_Add_Edi t_Delete_D CKDA_502_s pec.rb', : regression  => true d o
  21     include  DriverOper ationsModu le
  22     include  FHIROperat ionsModule
  23  
  24     before(: all) do
  25       patien tId = "PAT ID13"
  26       firstN ame = "zzt est"
  27       lastNa me = "pati ent14"
  28         userName =  " AI "
  29         password =  " AI "
  30  
  31       initia lizeConfig urations()
  32       remove WeightEntr ies(patien tId, first Name, last Name)
  33  
  34       @commo nElements  = CommonEl ement.new( @driver)
  35       @commo nTest = Co mmonTest.n ew(@driver )
  36       @leftn av = LeftS ideNav.new (@driver)
  37       @modal  = Modal.n ew(@driver )
  38       @filte r = Filter s.new(@dri ver)
  39       @error  = Errors. new(@drive r)
  40       @tklis tDetail =  TrackerLis tDetail.ne w(@driver)
  41  
  42       @commo nTest.pass ByLandingP ageAndAuth enticate(u serName, p assword, " #{lastName }, #{first Name}", pa tientId)
  43  
  44       begin
  45         Wati r::Wait.un til
  46         @com monElement s.angulart itle_eleme nt.visible ?
  47       rescue
  48         Wati r::Wait::T imeoutErro r
  49         unti l
  50         @com monElement s.angulart itle_eleme nt.visible ?
  51         end
  52       end
  53  
  54       @commo nTest.wait ForContent LoadedSumm aryPage
  55       @leftn av.leftSid eNav
  56       @leftn av.home_el ement.when _visible
  57  
  58       @commo nTest.navi gateToAsub Feature("K idneyTrack ers", ".we ight")
  59       Watir: :Wait.unti l {@common Elements.t ext.includ e? "Date R ange:"}
  60  
  61       $today Long = get DateNthDay sAgo(0, "% m/%d/%Y")
  62       $yeste rdayShort  = getDateN thDaysAgo( 1, "%m/%d/ %y")
  63       $yeste rdayLong =  getDateNt hDaysAgo(1 , "%m/%d/% Y")
  64       $tomor row = getD ateNthDays FromNow(1,  "%m/%d/%Y ")
  65       $sixYe arsAgo = g etDateNthY earsAgo(6,  "%m/%d/%Y ")
  66       $sixYe ars1dayAgo  = getDate NthDaysAgo (2193, "%m /%d/%Y")
  67       $oneYe arAgo = ge tDateNthYe arsAgo(1,  "%m/%d/%Y" )
  68     end
  69  
  70     after(:a ll) do
  71       @drive r.close
  72     end
  73  
  74     context  'AC#DCKDA- 604|TC#DCK DA-1195:   Add New En try for Ki dney Weigh t Tracker'  do
  75       it '.  Verify the  Add (+) b utton is a vailable'  do
  76         expe ct(@tklist Detail.add NewEntry?) .to eq(tru e)
  77       end
  78  
  79       it '.  Verify the  detail sc reen heade r displays  correctly ' do
  80         @tkl istDetail. addNewEntr y
  81         @com monElement s.primaryH eader_elem ent.when_v isible(tim eout=10)
  82         expe ct(@common Elements.p rimaryHead er).to eq( "Add Weigh t Entry")
  83       end
  84  
  85       it '.  Verify tha t required  field ind icator is  present an d all fiel ds are pre sent with  the correc t label' d o
  86         Wati r::Wait.un til {@comm onElements .text.incl ude? "Weig ht (lbs):" }
  87         expe ct(@common Elements.r equiredFie ldLabel).t o eq("* re quired fie ld")
  88         expe ct(@tklist Detail.dat eLabel).to  eq("* Dat e:")
  89         expe ct(@tklist Detail.tim eLabel).to  eq("* Tim e:")
  90         expe ct(@tklist Detail.wei ghtLbl.inc lude?("* W eight (lbs ):")).to e q(true)
  91         expe ct(@tklist Detail.not eLabel).to  eq("Note: ")
  92       end
  93  
  94       it '.  Verify tha t the MM/D D/YYYY dis plays as t he format  guidance a t Date fie ld; HH:MM  AM/PM disp lays as th e format g uidance at  Time fiel d' do
  95         expe ct(@tklist Detail.dat eOnDetail_ element.at tribute('p laceholder ')).to eq( "MM/DD/YYY Y")
  96         expe ct(@tklist Detail.tim eOnDetail_ element.at tribute('p laceholder ')).to eq( "HH:MM AM/ PM")
  97       end
  98  
  99       it '.  Verify tha t Date is  required a nd can not  be future  date; Tim e is requi red.' do
  100         @tkl istDetail. dateOnDeta il= ""
  101         slee p 0.5
  102         @tkl istDetail. timeOnDeta il= ""
  103         slee p 0.5
  104         @tkl istDetail. timeOnDeta il_element .send_keys (:tab)
  105         @tkl istDetail. saveBttn_e lement.foc us
  106         @tkl istDetail. saveBttn
  107         @err or.errorHe ader_eleme nt.when_vi sible
  108         expe ct(@error. isThisErro rDisplayed ("Date fie ld is requ ired.")).t o eq(true)
  109         expe ct(@error. isThisErro rDisplayed ("Time fie ld is requ ired.")).t o eq(true)
  110  
  111         @tkl istDetail. dateOnDeta il= $tomor row
  112         slee p 0.5
  113         @tkl istDetail. saveBttn
  114         errM sg  = "Dat e must be  between "  + $sixYear sAgo + " a nd " + $to dayLong +  "."
  115         
  116         expe ct(@error. isThisErro rDisplayed (errMsg)). to eq(true )
  117       end
  118  
  119       it '.  Verify the  Weight fi eld had a  guidance t ext displa yed correc tly. Error  message d isplays wh en Weight  value viol ates the r ule. ' do
  120         expe ct(@tklist Detail.wei ght_elemen t.attribut e("placeho lder")).to  eq("Betwe en 0.0 and  999.9")
  121         @tkl istDetail. weight= "1 000"
  122         @tkl istDetail. saveBttn
  123         expe ct(@tklist Detail.wei ght).to eq ("100")
  124       end
  125  
  126       it '.  Verify the  Note fiel d has a ch aracter co unter and  it allows  max 250 ch aracters'  do
  127         expe ct(@tklist Detail.cha racterCoun ter?).to e q(true)
  128         expe ct(@tklist Detail.tex tareaMaxLe ngthTest(2 50, true,  "textarea" ,"Note")). to eq(1)
  129         @tkl istDetail. cancelBttn
  130         @tkl istDetail. addNewEntr y_element. when_visib le(timeout =10)
  131       end
  132  
  133       it '.  Happy path , to add t hree entri es. Verify  the value s are save d and they  display c orrectly i n the Tabl e View' do
  134         @tkl istDetail. addAWeight Entry($yes terdayLong , "07:00 A M", 202, " ")
  135         valu eStr = '20 2, ' + $ye sterdayLon g + ' 07:0 0 AM'
  136         slee p 2
  137         @tkl istDetail. summaryTab le_element .when_visi ble(timeou t=15)
  138         expe ct(@tklist Detail.ver ifyValuesD isplayRigh tInTableVi ew(1, 3, v alueStr, f alse)).to  eq(true)
  139  
  140         @tkl istDetail. addAWeight Entry($yes terdayLong , "01:00 P M", 200, " ")
  141         valu eStr = '20 0, ' + $ye sterdayLon g + ' 01:0 0 PM'
  142         slee p 2
  143         @tkl istDetail. summaryTab le_element .when_visi ble(timeou t=15)
  144         expe ct(@tklist Detail.ver ifyValuesD isplayRigh tInTableVi ew(1, 3, v alueStr, f alse)).to  eq(true)
  145  
  146         @tkl istDetail. addAWeight Entry($yes terdayLong , "08:00 P M", 196, " I'm a lose r!")
  147         valu eStr = '19 6, ' + $ye sterdayLon g + ' 08:0 0 PM'
  148         slee p 2
  149         @tkl istDetail. summaryTab le_element .when_visi ble(timeou t=15)
  150         expe ct(@tklist Detail.ver ifyValuesD isplayRigh tInTableVi ew(1, 3, v alueStr, t rue)).to e q(true)
  151       end
  152  
  153       it '.  Verify tha t Date and  Time valu es must be  unique. U sers canno t save mor e than one  entry for  a given d ate/time.'  do
  154         @tkl istDetail. addAWeight Entry($yes terdayLong , "08:00 P M", 100, " I'm a lose r!")
  155         slee p 2
  156         if @ error.erro rHeader? ! = true
  157           ex pect("Dupl icate date /time were  saved wit hout throw ing an err or").to eq ("Duplicat e date/tim e is not a llowed")
  158         else
  159           er rMsg  = "A n entry ha s already  been saved  with the  same date  and time.  Please cha nge your d ate and/or  time and  save again ."
  160           ex pect(@erro r.isThisEr rorDisplay ed(errMsg) ).to eq(tr ue)
  161           @t klistDetai l.cancelBt tn
  162           @t klistDetai l.summaryT able_eleme nt.when_vi sible(time out=15)
  163         end
  164       end
  165     end
  166  
  167     context  'AC#DCKDA- 605|TC#DCK DA-1195:   Edit an En try for Ki dney Weigh t Tracker'  do
  168       it '.  Verify tha t All data  elements  available  in Add Ent ry mode ar e visible. ' do
  169         @tkl istDetail. clickAnEnt ryToEditOr Delete(1)
  170         @com monTest.wa itForConte ntLoaded
  171         expe ct(@common Elements.p rimaryHead er).to eq( "Edit Weig ht Entry")
  172         expe ct(@tklist Detail.dat eLabel).to  eq("* Dat e:")
  173         expe ct(@tklist Detail.tim eLabel).to  eq("* Tim e:")
  174         expe ct(@tklist Detail.wei ghtLbl.inc lude?"* We ight (lbs) :").to eq( true)
  175         expe ct(@tklist Detail.not eLabel).to  eq("Note: ")
  176       end
  177  
  178       it '.  Verify tha t all valu es previou sly saved  are visibl e.' do
  179         expe ct(@tklist Detail.dat eOnDetail) .to eq($ye sterdayLon g)
  180         expe ct(@tklist Detail.tim eOnDetail) .to eq("08 :00 PM")
  181         expe ct(@tklist Detail.wei ght).to eq ("196")
  182         expe ct(@tklist Detail.not e).to eq(" I'm a lose r!")
  183       end
  184  
  185       it '.  Modify a v alue and s ave. Verif y the upda ted value  displays i n the tabl e view' do
  186         @tkl istDetail. weight= 20 0
  187         @tkl istDetail. saveBttn
  188  
  189         valu eStr = '20 0, ' + $ye sterdayLon g + ' 08:0 0 PM'
  190         slee p 2
  191         @tkl istDetail. summaryTab le_element .when_visi ble(timeou t=15)
  192         expe ct(@tklist Detail.ver ifyValuesD isplayRigh tInTableVi ew(1, 3, v alueStr, t rue)).to e q(true)
  193       end
  194     end
  195  
  196     context  'AC#DCKDA- 606|TC#DCK DA-1195:   Cancel and  Delete fo r Kidney W eight' do
  197       it '.  Verify tha t When a u ser select s Cancel,  no updates  are made  to the rec ord.' do
  198         @tkl istDetail. clickAnEnt ryToEditOr Delete(1)
  199         @tkl istDetail. cancelBttn
  200         
  201         valu eStr = '20 0, ' + $ye sterdayLon g + ' 08:0 0 PM'
  202         @tkl istDetail. summaryTab le_element .when_visi ble(timeou t=15)
  203         expe ct(@tklist Detail.ver ifyValuesD isplayRigh tInTableVi ew(1, 3, v alueStr, t rue)).to e q(true)
  204       end
  205  
  206       it '.  Verify tha t When a u ser select s Delete,  the system  prompts t he user to  confirm t he Delete  by display ing a moda l:' do
  207         @tkl istDetail. clickAnEnt ryToEditOr Delete(1)
  208         @tkl istDetail. deleteBttn
  209         @mod al.modalTi tle_elemen t.when_vis ible
  210         expe ct(@modal. modalTitle ).to eq("C onfirmatio n")
  211         expe ct(@modal. section1). to eq("Are  you sure  you want t o remove t his entry?  Select YE S to remov e the entr y or NO to  return to  the entry  screen.")
  212         @mod al.ok2
  213         @mod al.modalTi tle_elemen t.when_not _visible
  214         expe ct(@common Elements.p rimaryHead er).to eq( "Edit Weig ht Entry")
  215  
  216         begi n
  217           Wa tir::Wait. until
  218           @t klistDetai l.busySpin ner_elemen t.when_not _visible
  219         resc ue
  220           Wa tir::Wait: :TimeoutEr ror
  221           un til
  222           @t klistDetai l.busySpin ner_elemen t.when_not _visible
  223           en d
  224         end
  225  
  226         slee p 1
  227  
  228         @tkl istDetail. deleteBttn
  229         @mod al.modalTi tle_elemen t.when_vis ible
  230         @mod al.yes
  231         valu eStr = $ye sterdayLon g + "08:00  PM"
  232         expe ct(@tklist Detail.sea rchThisVal ueInAllRow s(1, value Str)).to e q(false)
  233       end
  234     end
  235  
  236     context  'AC#DCKDA- 607 |TC#DC KDA-1195:  Navigation ' do
  237       it '.  Verify tha t < is sho wn on the  list scree n when on  a phone vi ew and has  the corre ct alt tex t. Clickin g it retur ns the use r to the l ist view'  do
  238  
  239         begi n
  240           Wa tir::Wait. until
  241           @t klistDetai l.busySpin ner_elemen t.when_not _visible
  242         resc ue
  243           Wa tir::Wait: :TimeoutEr ror
  244           un til
  245           @t klistDetai l.busySpin ner_elemen t.when_not _visible
  246           en d
  247         end
  248  
  249         @tkl istDetail. addNewEntr y_element. when_visib le
  250         @tkl istDetail. addNewEntr y
  251         @com monTest.wa itForConte ntLoaded
  252         
  253         resi zeWindowTo (320, 480)
  254         slee p 1
  255         expe ct(@common Elements.r eturnToPre vScreen?). to eq(true )
  256         expe ct(@common Elements.r eturnToPre vScreen_el ement.attr ibute('tit le')).to e q("Return  to Previou s Screen")
  257  
  258         @com monElement s.returnTo PrevScreen
  259         @com monElement s.primaryH eader_elem ent.when_v isible(tim eout=10)
  260         expe ct(@common Elements.p rimaryHead er).to eq( "Weight")
  261       end
  262  
  263       it '.  Verify use r is promp t with a m odal when  clicking <  with unsa ved data'  do
  264         @tkl istDetail. startDate_ element.se nd_keys(:t ab)
  265         @tkl istDetail. startDate
  266  
  267         @com monElement s.scrollDo wn(@driver )
  268         
  269         @tkl istDetail. clickAnEnt ryToEditOr Delete(1)
  270         @tkl istDetail. weight= 23 0
  271         @com monElement s.returnTo PrevScreen
  272         @mod al.modalTi tle_elemen t.when_vis ible
  273         expe ct(@modal. modalTitle ).to eq("C onfirmatio n")
  274         expe ct(@modal. section1). to eq("You  have not  saved your  changes.  If you wis h to conti nue withou t saving s elect CONT INUE, othe rwise sele ct RETURN  to return  to the ent ry screen. ")
  275  
  276         @mod al.ok2
  277         @mod al.modalTi tle_elemen t.when_not _visible
  278         expe ct(@common Elements.p rimaryHead er).to eq( "Edit Weig ht Entry")
  279  
  280         @tkl istDetail. weight= 23 0
  281         @com monElement s.returnTo PrevScreen
  282         @mod al.modalTi tle_elemen t.when_vis ible
  283         
  284         @mod al.yes
  285         @mod al.modalTi tle_elemen t.when_not _visible
  286         expe ct(@common Elements.p rimaryHead er).to eq( "Weight")
  287       end
  288  
  289       it '.  Verify tha t when nav igate away  from a sc reen with  unsaved da ta, the sa me modal p ops up' do
  290         @tkl istDetail. startDate_ element.se nd_keys(:t ab)
  291         @tkl istDetail. startDate
  292         Wati r::Wait.un til {@tkli stDetail.t ext.includ e? "Weight  (lbs)"}
  293  
  294         @tkl istDetail. clickAnEnt ryToEditOr Delete(1)
  295         @tkl istDetail. weight= 23 0
  296         @lef tnav.leftS ideNav
  297         @lef tnav.home_ element.wh en_visible
  298         @lef tnav.learn More
  299         @mod al.modalTi tle_elemen t.when_vis ible
  300         expe ct(@modal. modalTitle ).to eq("C onfirmatio n")
  301         expe ct(@modal. section1). to eq("You  have not  saved your  changes.  If you wis h to conti nue withou t saving s elect CONT INUE, othe rwise sele ct RETURN  to return  to the ent ry screen. ")
  302  
  303         @mod al.yes
  304  
  305         resi zeWindowTo Default()
  306       end
  307     end
  308   end