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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | mobile-kidney-web-2.0.0.zip\mobile-kidney-web\acceptance_test\watir\spec\kidney-tracker | Glucose_Filter_And_List_DCKDA_1137_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 | Glucose_Filter_And_List_DCKDA_1137_spec.rb | Tue May 29 15:45:38 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 526 |
| Changed | 1 | 4 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | #!/bin/env ruby | |
| 2 | # encoding : utf-8 | |
| 3 | ||
| 4 | require 'r ubygems' | |
| 5 | require 'r spec' | |
| 6 | require 'w atir-webdr iver' | |
| 7 | ||
| 8 | require_re lative '.. /rspec_hel per' | |
| 9 | require_re lative '.. /../lib/pa ges/left_s ide_nav' | |
| 10 | require_re lative '.. /../lib/pa ges/common _elements' | |
| 11 | require_re lative '.. /../lib/pa ges/common _tests' | |
| 12 | require_re lative '.. /../lib/pa ges/filter s' | |
| 13 | require_re lative '.. /../lib/pa ges/error_ validation s' | |
| 14 | require_re lative '.. /../lib/pa ges/tracke rs_list_an d_detail' | |
| 15 | require_re lative '.. /../lib/mo dule/FHIRO perationsM odule' | |
| 16 | ||
| 17 | describe ' Story#DCKD A-1137 Glu cose_Filte r_And_List _DCKDA_113 7_spec.rb' , :regress ion => tru e do | |
| 18 | include DriverOper ationsModu le | |
| 19 | include FHIROperat ionsModule | |
| 20 | ||
| 21 | before(: all) do | |
| 22 | patien tId = "PAT ID12" | |
| 23 | firstN ame = "zzt est" | |
| 24 | lastNa me = "pati ent13" | |
| 25 | userName = " AI " | |
| 26 | password = " AI " | |
| 27 | ||
| 28 | entrie s = [ | |
| 29 | { :v alue => 18 0, :testMe thod => 'A fter Meal' , :effecti veDateTime => '2017- 04-16T17:3 0:00-04:00 ', :commen ts => "Thi s is a com ment" }, | |
| 30 | { :v alue => 20 0, :testMe thod => 'A fter Meal' , :effecti veDateTime => '2017- 02-03T02:1 7:00-05:00 ' }, | |
| 31 | { :v alue => 7, :testMeth od => 'Fas ting (8 ho urs)', :ef fectiveDat eTime => ' 2017-01-22 T12:00:00- 05:00' } | |
| 32 | ] | |
| 33 | ||
| 34 | initia lizeConfig urations() | |
| 35 | remove GlucoseEnt ries(patie ntId, firs tName, las tName) | |
| 36 | addGlu coseEntrie s(entries, patientId , firstNam e, lastNam e) | |
| 37 | ||
| 38 | @commo nElements = CommonEl ement.new( @driver) | |
| 39 | @commo nTest = Co mmonTest.n ew(@driver ) | |
| 40 | @leftn av = LeftS ideNav.new (@driver) | |
| 41 | @filte r = Filter s.new(@dri ver) | |
| 42 | @error = Errors. new(@drive r) | |
| 43 | @tklis tDetail = TrackerLis tDetail.ne w(@driver) | |
| 44 | ||
| 45 | @commo nTest.pass ByLandingP ageAndAuth enticate(u serName, p assword, " #{lastName }, #{first Name}", pa tientId) | |
| 46 | ||
| 47 | begin | |
| 48 | Wati r::Wait.un til | |
| 49 | @com monElement s.angulart itle_eleme nt.visible ? | |
| 50 | rescue | |
| 51 | Wati r::Wait::T imeoutErro r | |
| 52 | unti l | |
| 53 | @com monElement s.angulart itle_eleme nt.visible ? | |
| 54 | end | |
| 55 | end | |
| 56 | ||
| 57 | @commo nTest.wait ForContent LoadedSumm aryPage | |
| 58 | @leftn av.leftSid eNav | |
| 59 | @leftn av.home_el ement.when _visible | |
| 60 | ||
| 61 | @commo nTest.navi gateToAsub Feature("K idneyTrack ers", ".gl ucose") | |
| 62 | @commo nElements. contentLoa ded_elemen t.when_pre sent | |
| 63 | ||
| 64 | $today Long = get DateNthDay sAgo(0, "% m/%d/%Y") | |
| 65 | $yeste rdayShort = getDateN thDaysAgo( 1, "%m/%d/ %y") | |
| 66 | $yeste rdayLong = getDateNt hDaysAgo(1 , "%m/%d/% Y") | |
| 67 | $tomor row = getD ateNthDays FromNow(1, "%m/%d/%Y ") | |
| 68 | $sixYe arsAgo = g etDateNthY earsAgo(6, "%m/%d/%Y ") | |
| 69 | $sixYe ars1dayAgo = getDate NthDaysAgo (2193, "%m /%d/%Y") | |
| 70 | $oneYe arAgo = ge tDateNthYe arsAgo(1, "%m/%d/%Y" ) | |
| 71 | ||
| 72 | end | |
| 73 | ||
| 74 | after(:a ll) do | |
| 75 | @drive r.close | |
| 76 | end | |
| 77 | ||
| 78 | context 'AC#DCKDA- 626|TC#DCK DA-566: S ub Feature Selection ' do | |
| 79 | it '. Verify sub feature L abel displ ays correc tly' do | |
| 80 | expe ct(@leftna v.getSubFe atureText( '.glucose' , 'KidneyT rackers')) .to eq("Gl ucose") | |
| 81 | end | |
| 82 | ||
| 83 | it '. Verify tha t date of the most r ecent trac ker displa ys correct ly' do | |
| 84 | if $ yesterdayS hort == "0 4/16/17" | |
| 85 | di splayedDat e = "Yeste rday" | |
| 86 | else | |
| 87 | di splayedDat e = "04/16 /17" | |
| 88 | end | |
| 89 | ||
| 90 | @tkl istDetail. summaryTab le_element .when_visi ble(timeou t=10) | |
| 91 | expe ct(@leftna v.getDispl ayedDateFo rFeature(' .glucose') ).to eq(di splayedDat e) | |
| 92 | end | |
| 93 | ||
| 94 | it '. Verify tha t the most recent va lue displa ys on the right side of the na v button' do | |
| 95 | expe ct(@leftna v.getDispl ayedReadin gForFeatur e('.glucos e')).to eq ("180 mg/d l") | |
| 96 | end | |
| 97 | ||
| 98 | it '. Verify tha t Glucose button dis plays at t he 2nd fro m the last item in t he sub-fea ture list' do | |
| 99 | expe ct(@leftna v.isThisFe atureInThe RightPlace (3, '.gluc ose', 'Glu cose','Kid neyTracker s')).to eq (true) | |
| 100 | end | |
| 101 | end | |
| 102 | ||
| 103 | context 'AC#DCKDA- 627|TC#DCK DA-571: S ub Feature Default V iew (Filte r and Tabl e List)' d o | |
| 104 | it '. Verify tha t the deta il screen has the co rrect head er' do | |
| 105 | @com monElement s.primaryH eader_elem ent.when_v isible(tim eout=10) | |
| 106 | expe ct(@common Elements.p rimaryHead er).to eq( "Glucose") | |
| 107 | end | |
| 108 | ||
| 109 | it '. Filter def aults to a n expanded view. Fil ter button alt text reads “Col lapse filt er options ” when exp anded.' do | |
| 110 | expe ct(@filter .startDate ?).to eq(t rue) | |
| 111 | expe ct(@filter .filterAcc dBttn_elem ent.attrib ute('title ')).to eq( "Collapse filter opt ions") | |
| 112 | end | |
| 113 | ||
| 114 | it '. Users can collapse t he filter list by cl icking on the Collap se filter icon. When collapsed , the filt er icon al t text rea ds “Expand filter op tions.”' d o | |
| 115 | @fil ter.filter AccdBttn | |
| 116 | @fil ter.startD ate_elemen t.when_not _visible(t imeout=15) | |
| 117 | expe ct(@filter .filterAcc dBttn_elem ent.attrib ute('title ')).to eq( "Expand fi lter optio ns") | |
| 118 | end | |
| 119 | ||
| 120 | it '. Date Range is defaul t to the p ast 12 mon ths' do | |
| 121 | @fil ter.filter AccdBttn | |
| 122 | @fil ter.startD ate_elemen t.when_vis ible(timeo ut=15) | |
| 123 | expe ct(@filter .startDate ).to eq($o neYearAgo) | |
| 124 | expe ct(@filter .endDate). to eq($tod ayLong) | |
| 125 | end | |
| 126 | ||
| 127 | it '. Verify Sta rt Date an d End Date label and the requi red field sympol dis play corre ctly ' do | |
| 128 | expe ct(@filter .getRequir edFieldSym polAndText ("startDat e")).to eq ("*Start D ate:") | |
| 129 | expe ct(@filter .getRequir edFieldSym polAndText ("endDate" )).to eq(" *End Date: ") | |
| 130 | end | |
| 131 | ||
| 132 | it '. Verify tha t the MM/D D/YYYY dis plays as t he format sample' do | |
| 133 | expe ct(@filter .startDate _element.a ttribute(' placeholde r')).to eq ("MM/DD/YY YY") | |
| 134 | expe ct(@filter .endDate_e lement.att ribute('pl aceholder' )).to eq(" MM/DD/YYYY ") | |
| 135 | end | |
| 136 | ||
| 137 | it '. Verify tha t the Star t Date Can not be fut ure date, cannot be after the End date; date canno t be more than 6 yea rs in the past' do | |
| 138 | @fil ter.startD ate= "" | |
| 139 | @fil ter.startD ate= $tomo rrow | |
| 140 | slee p 0.5 | |
| 141 | @fil ter.filter Bttn | |
| 142 | @err or.errorHe ader_eleme nt.when_vi sible | |
| 143 | errM sg = "Sta rt Date mu st be betw een " + $s ixYearsAgo + " and " + $todayL ong + "." | |
| 144 | expe ct(@error. isThisErro rDisplayed (errMsg)). to eq(true ) | |
| 145 | expe ct(@error. isThisErro rDisplayed ("Start Da te must oc cur before End Date. ")).to eq( true) | |
| 146 | ||
| 147 | @fil ter.startD ate= "" | |
| 148 | @fil ter.startD ate= $sixY ears1dayAg o | |
| 149 | slee p 0.5 | |
| 150 | @fil ter.filter Bttn | |
| 151 | @err or.errorHe ader_eleme nt.when_vi sible | |
| 152 | errM sg = "Star t Date mus t be betwe en " + $si xYearsAgo + " and " + $todayLo ng + "." | |
| 153 | expe ct(@error. isThisErro rDisplayed (errMsg)). to eq(true ) | |
| 154 | end | |
| 155 | ||
| 156 | it '. Verify tha t the End Date Canno t be futur e date' do | |
| 157 | @fil ter.endDat e= "" | |
| 158 | @fil ter.endDat e= $tomorr ow | |
| 159 | slee p 0.5 | |
| 160 | @fil ter.filter Bttn | |
| 161 | @err or.errorHe ader_eleme nt.when_vi sible | |
| 162 | errM sg = "End Date must be betwee n " + $six YearsAgo + " and " + $todayLon g + "." | |
| 163 | expe ct(@error. isThisErro rDisplayed (errMsg)). to eq(true ) | |
| 164 | ||
| 165 | @fil ter.startD ate= "" | |
| 166 | @fil ter.endDat e= "" | |
| 167 | @fil ter.startD ate= $toda yLong | |
| 168 | @fil ter.endDat e = $yeste rdayLong | |
| 169 | slee p 0.5 | |
| 170 | @fil ter.filter Bttn | |
| 171 | @err or.errorHe ader_eleme nt.when_vi sible | |
| 172 | expe ct(@error. isThisErro rDisplayed ("Start Da te must oc cur before End Date. ")).to eq( true) | |
| 173 | end | |
| 174 | end | |
| 175 | ||
| 176 | context 'AC#DCKDA- 628,752|TC #DCKDA-571 : Reset F ilter Func tionality; Filter Ac tion and R esults Dis play' do | |
| 177 | it '. Verify tha t Reset ch anges the date range to defaul t and it f ilters res ults as ex pected. Ve rify colum n headers displaye c orrectly' do | |
| 178 | @fil ter.resetB ttn | |
| 179 | slee p 0.5 | |
| 180 | expe ct(@filter .startDate ).to eq($o neYearAgo) | |
| 181 | expe ct(@filter .endDate). to eq($tod ayLong) | |
| 182 | @fil ter.filter Bttn | |
| 183 | @com monElement s.noResult FountMsg_e lement.whe n_not_visi ble(timeou t=10) | |
| 184 | expe ct(@common Elements.n oResultFou ntMsg?).to eq(false) | |
| 185 | ||
| 186 | @tkl istDetail. summaryTab le_element .when_visi ble(timeou t=10) | |
| 187 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(1)). to eq("Glu cose Level (mg/dl)") | |
| 188 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(2)). to eq("Tes ted") | |
| 189 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(3)). to eq("Dat e/Time") | |
| 190 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(4)). to eq("Not e") | |
| 191 | end | |
| 192 | ||
| 193 | it '. Verify tha t all prep opulated d ata displa y when use r clicks t he filter button' do | |
| 194 | list s = [ | |
| 195 | { :valueSt r => '180, After Mea l, 04/16/2 017 05:30 PM', :hasN ote => tru e }, | |
| 196 | { :valueSt r => '200, After Mea l, 02/03/2 017 02:17 AM', :hasN ote => fal se }, | |
| 197 | { :valueSt r => '7, F asting (8 hours), 01 /22/2017 1 2:00 PM', :hasNote = > false } | |
| 198 | ] | |
| 199 | ||
| 200 | slee p 1 | |
| 201 | ||
| 202 | list s.each_wit h_index do |listItem , i| | |
| 203 | sl eep 1 | |
| 204 | ex pect(@tkli stDetail.v erifyValue sDisplayRi ghtInTable View(i+1, 4, listIte m[:valueSt r], listIt em[:hasNot e])).to eq (true) | |
| 205 | end | |
| 206 | end | |
| 207 | ||
| 208 | it '. Verify tha t the list is sorted reverse c hronologic ally.' do | |
| 209 | expe ct(@tklist Detail.ver ifyListAre SortedReve rseChronol ogically(' %m/%d/%Y % I:%M %p', 3, 'kidney tracker')) .to eq(tru e) | |
| 210 | end | |
| 211 | ||
| 212 | it '. Verify tha t by selec ting a dif ferent cho ice from t he Test co ndition dr op down, t he list vi ew display s differen t results ' do | |
| 213 | sect ions = [ | |
| 214 | { :filterB y => "Afte r Meal", : notDisplay ed1 => "Fa sting (8 h ours)", :n otDisplaye d2 => "Unk nown", :no tDisplayed 3 => "" }, | |
| 215 | { :filterB y => "Fast ing (8 hou rs)", :not Displayed1 => "After Meal", :n otDisplaye d2 => "Unk nown", :no tDisplayed 3 => "" }, | |
| 216 | { :filterB y => "Unkn own", :not Displayed1 => "Fasti ng (8 hour s)", :notD isplayed2 => "After Meal", :no tDisplayed 3 => "" } | |
| 217 | ] | |
| 218 | ||
| 219 | sect ions.each_ with_index do |secti on, index| | |
| 220 | ||
| 221 | @t klistDetai l.testMeth od= sectio n[:filterB y] | |
| 222 | @f ilter.filt erBttn | |
| 223 | sl eep 1 | |
| 224 | Wa tir::Wait. until {@tk listDetail .searchThi sValueInAl lRows(2, s ection[:no tDisplayed 1]) == fal se} | |
| 225 | ||
| 226 | ex pect(@tkli stDetail.s earchThisV alueInAllR ows(2, sec tion[:notD isplayed1] )).to eq(f alse) | |
| 227 | ex pect(@tkli stDetail.s earchThisV alueInAllR ows(2, sec tion[:notD isplayed2] )).to eq(f alse) | |
| 228 | ex pect(@tkli stDetail.s earchThisV alueInAllR ows(2, sec tion[:notD isplayed3] )).to eq(f alse) | |
| 229 | @f ilter.rese tBttn | |
| 230 | end | |
| 231 | end | |
| 232 | end | |
| 233 | ||
| 234 | context 'AC#DCKDA- 629 |TC#DC KDA-571: N avigation on Phone v iew' do | |
| 235 | it '. Verify tha t < is sho wn on the list scree n when on a phone vi ew and the Tested co lumn is hi dden' do | |
| 236 | resi zeWindowTo (320, 480) | |
| 237 | slee p 1 | |
| 238 | expe ct(@common Elements.r eturnToPre vScreen?). to eq(true ) | |
| 239 | expe ct(@common Elements.r eturnToPre vScreen_el ement.attr ibute('tit le')).to e q("Return to Kidney Trackers o ptions") | |
| 240 | expe ct(@tklist Detail.isT hisColumnH idden(2)). to eq("hid den-xs") | |
| 241 | end | |
| 242 | ||
| 243 | it '. Verify cli cking the < button r eturns to the Main S creen for the featur e where th e group op tions for that featu re are lis ted.' do | |
| 244 | @com monElement s.returnTo PrevScreen | |
| 245 | @com monElement s.secondar yHeader_el ement.when _visible(t imeout=10) | |
| 246 | expe ct(@common Elements.s econdaryHe ader).to e q("Kidney Trackers") | |
| 247 | ||
| 248 | resi zeWindowTo Default() | |
| 249 | end | |
| 250 | end | |
| 251 | ||
| 252 | context 'AC#DCKDA- |TC#DCKD-5 71: No Res ults found message' do | |
| 253 | it '. Verify if no records are found when a fi lter is ap plied the message th e followin g message is shown i n the scre en area in place of the table view.' do | |
| 254 | @lef tnav.gluco se | |
| 255 | @com monElement s.primaryH eader_elem ent.when_v isible | |
| 256 | @fil ter.startD ate= $oneY earAgo | |
| 257 | @fil ter.endDat e= $oneYea rAgo | |
| 258 | slee p 1 | |
| 259 | @fil ter.filter Bttn | |
| 260 | @com monElement s.noResult FountMsg_e lement.whe n_visible | |
| 261 | expe ct(@common Elements.n oResultFou ntMsg).to eq("No res ults were found with the curre nt filters . Use the Add button above to create a n ew record. ") | |
| 262 | end | |
| 263 | end | |
| 264 | ||
| 265 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.