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 | Kidney_Journal_Filter_And_List_DCKDA_499_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 | Kidney_Journal_Filter_And_List_DCKDA_499_spec.rb | Tue May 29 15:46:59 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 500 |
| 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-499 Kidn ey_Journal _Filter_An d_List_DCK DA_499_spe c.rb', :re gression = > true 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 | $twoMo nthsAgoSta mp = getDa teNthMonth sAgo(2, "% Y-%m-%d") | |
| 29 | $twoMo nthsAgo = getDateNth MonthsAgo( 2, "%m/%d/ %Y") | |
| 30 | $oneMo nthAgoStam p = getDat eNthMonths Ago(1, "%Y -%m-%d") | |
| 31 | $oneMo nthAgo = g etDateNthM onthsAgo(1 , "%m/%d/% Y") | |
| 32 | $tenDa ysAgoStamp = getDate NthDaysAgo (10, "%Y-% m-%d") | |
| 33 | $tenDa ysAgo = ge tDateNthDa ysAgo(10, "%m/%d/%Y" ) | |
| 34 | ||
| 35 | entrie s = [ | |
| 36 | { :t itle => "D iet plan f ollow up - 2", :effe ctiveDateT ime => "#{ $tenDaysAg oStamp}T17 :00:00#{ge tUTCOffset ()}", :has FollowUp = > false}, | |
| 37 | { :t itle => "D iet plan f ollow up - 1", :effe ctiveDateT ime => "#{ $oneMonthA goStamp}T1 7:00:00#{g etUTCOffse t()}", :ha sFollowUp => true}, | |
| 38 | { :t itle => "S tart a die t plan", : effectiveD ateTime => "#{$twoMo nthsAgoSta mp}T17:59: 00#{getUTC Offset()}" , :hasFoll owUp => tr ue} | |
| 39 | ] | |
| 40 | ||
| 41 | initia lizeConfig urations() | |
| 42 | remove KidneyJour nalEntries (patientId , firstNam e, lastNam e) | |
| 43 | addKid neyJournal Entries(en tries, pat ientId, fi rstName, l astName) | |
| 44 | ||
| 45 | @commo nElements = CommonEl ement.new( @driver) | |
| 46 | @commo nTest = Co mmonTest.n ew(@driver ) | |
| 47 | @leftn av = LeftS ideNav.new (@driver) | |
| 48 | @filte r = Filter s.new(@dri ver) | |
| 49 | @error = Errors. new(@drive r) | |
| 50 | @tklis tDetail = TrackerLis tDetail.ne w(@driver) | |
| 51 | ||
| 52 | @commo nTest.pass ByLandingP ageAndAuth enticate(u serName, p assword, " #{lastName }, #{first Name}", pa tientId) | |
| 53 | begin | |
| 54 | Wati r::Wait.un til | |
| 55 | @com monElement s.angulart itle_eleme nt.visible ? | |
| 56 | rescue | |
| 57 | Wati r::Wait::T imeoutErro r | |
| 58 | unti l | |
| 59 | @com monElement s.angulart itle_eleme nt.visible ? | |
| 60 | end | |
| 61 | end | |
| 62 | ||
| 63 | @commo nTest.wait ForContent LoadedSumm aryPage | |
| 64 | @leftn av.leftSid eNav | |
| 65 | ||
| 66 | @leftn av.home_el ement.when _visible | |
| 67 | @commo nTest.navi gateToAsub Feature("K idneyTrack ers", ".ki dney-journ al") | |
| 68 | ||
| 69 | $today Long = get DateNthDay sAgo(0, "% m/%d/%Y") | |
| 70 | $three MonthsAgo = getDateN thDaysAgo( 90, "%m/%d /%Y") | |
| 71 | $yeste rdayLong = getDateNt hDaysAgo(1 , "%m/%d/% Y") | |
| 72 | $tomor row = getD ateNthDays FromNow(1, "%m/%d/%Y ") | |
| 73 | $sixYe arsAgo = g etDateNthY earsAgo(6, "%m/%d/%Y ") | |
| 74 | $sixYe ars1dayAgo = getDate NthDaysAgo (2193, "%m /%d/%Y") | |
| 75 | ||
| 76 | end | |
| 77 | ||
| 78 | after(:a ll) do | |
| 79 | @drive r.close | |
| 80 | end | |
| 81 | ||
| 82 | context 'AC#DCKDA- 610|TC#DCK DA-1182: Sub Featur e Selectio n' do | |
| 83 | it '. Verify sub feature L abel displ ays correc tly' do | |
| 84 | expe ct(@leftna v.getSubFe atureText( '.kidney-j ournal', ' KidneyTrac kers')).to eq("Kidne y Journal" ) | |
| 85 | end | |
| 86 | ||
| 87 | it '. Verify tha t Kidney J ournal dis plays as t he last it em in the sub-featur e list' do | |
| 88 | expe ct(@leftna v.isThisFe atureInThe RightPlace (4, '.kidn ey-journal ', 'Kidney Journal', 'KidneyTr ackers')). to eq(true ) | |
| 89 | end | |
| 90 | end | |
| 91 | ||
| 92 | context 'AC#DCKDA- 601,|TC#DC KDA-1182: Sub Featu re Default View (Fil ter and Ta ble List)' do | |
| 93 | it '. Verify tha t the deta il screen has the co rrect head er' do | |
| 94 | @com monElement s.primaryH eader_elem ent.when_v isible(tim eout=10) | |
| 95 | expe ct(@common Elements.p rimaryHead er).to eq( "Kidney Jo urnal") | |
| 96 | end | |
| 97 | ||
| 98 | it '. Verify tha t the PDF button is visible on Kidney Jo urnal list view scre en' do | |
| 99 | expe ct(@tklist Detail.pdf Button?).t o eq(false ) | |
| 100 | end | |
| 101 | ||
| 102 | it '. Filter def aults to a n expanded view. Fil ter button alt text reads “Col lapse filt er options ” when exp anded.' do | |
| 103 | expe ct(@filter .startDate ?).to eq(t rue) | |
| 104 | expe ct(@filter .filterAcc dBttn_elem ent.attrib ute('title ')).to eq( "Collapse filter opt ions") | |
| 105 | end | |
| 106 | ||
| 107 | 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 | |
| 108 | @fil ter.filter AccdBttn | |
| 109 | @fil ter.startD ate_elemen t.when_not _visible(t imeout=15) | |
| 110 | expe ct(@filter .filterAcc dBttn_elem ent.attrib ute('title ')).to eq( "Expand fi lter optio ns") | |
| 111 | end | |
| 112 | ||
| 113 | it '. Date Range is defaul t to the p ast 90 day s' do | |
| 114 | @fil ter.filter AccdBttn | |
| 115 | @fil ter.startD ate_elemen t.when_vis ible(timeo ut=15) | |
| 116 | expe ct(@filter .startDate ).to eq($t hreeMonths Ago) | |
| 117 | expe ct(@filter .endDate). to eq($tod ayLong) | |
| 118 | end | |
| 119 | ||
| 120 | it '. Verify Sta rt Date an d End Date label and the requi red field sympol dis play corre ctly ' do | |
| 121 | expe ct(@filter .getRequir edFieldSym polAndText ("startDat e")).to eq ("*Start D ate:") | |
| 122 | expe ct(@filter .getRequir edFieldSym polAndText ("endDate" )).to eq(" *End Date: ") | |
| 123 | end | |
| 124 | ||
| 125 | it '. Verify tha t the MM/D D/YYYY dis plays as t he format sample' do | |
| 126 | expe ct(@filter .startDate _element.a ttribute(' placeholde r')).to eq ("MM/DD/YY YY") | |
| 127 | expe ct(@filter .endDate_e lement.att ribute('pl aceholder' )).to eq(" MM/DD/YYYY ") | |
| 128 | end | |
| 129 | ||
| 130 | 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 | |
| 131 | @fil ter.startD ate= "" | |
| 132 | @fil ter.startD ate= $tomo rrow | |
| 133 | slee p 0.5 | |
| 134 | @fil ter.filter Bttn | |
| 135 | @err or.errorHe ader_eleme nt.when_vi sible | |
| 136 | errM sg = "Sta rt Date mu st be betw een " + $s ixYearsAgo + " and " + $todayL ong + "." | |
| 137 | expe ct(@error. isThisErro rDisplayed (errMsg)). to eq(true ) | |
| 138 | expe ct(@error. isThisErro rDisplayed ("Start Da te must oc cur before End Date. ")).to eq( true) | |
| 139 | ||
| 140 | @fil ter.startD ate= $sixY ears1dayAg o | |
| 141 | slee p 0.5 | |
| 142 | @fil ter.filter Bttn | |
| 143 | @err or.errorHe ader_eleme nt.when_vi sible | |
| 144 | errM sg = "Star t Date mus t be betwe en " + $si xYearsAgo + " and " + $todayLo ng + "." | |
| 145 | expe ct(@error. isThisErro rDisplayed (errMsg)). to eq(true ) | |
| 146 | end | |
| 147 | ||
| 148 | it '. Verify tha t the End Date Canno t be futur e date' do | |
| 149 | @fil ter.endDat e= "" | |
| 150 | @fil ter.endDat e= $tomorr ow | |
| 151 | slee p 0.5 | |
| 152 | @fil ter.filter Bttn | |
| 153 | @err or.errorHe ader_eleme nt.when_vi sible | |
| 154 | errM sg = "End Date must be betwee n " + $six YearsAgo + " and " + $todayLon g + "." | |
| 155 | expe ct(@error. isThisErro rDisplayed (errMsg)). to eq(true ) | |
| 156 | ||
| 157 | @fil ter.startD ate= "" | |
| 158 | @fil ter.endDat e= "" | |
| 159 | @fil ter.startD ate= $toda yLong | |
| 160 | @fil ter.endDat e = $yeste rdayLong | |
| 161 | slee p 0.5 | |
| 162 | @fil ter.filter Bttn | |
| 163 | @err or.errorHe ader_eleme nt.when_vi sible | |
| 164 | expe ct(@error. isThisErro rDisplayed ("Start Da te must oc cur before End Date. ")).to eq( true) | |
| 165 | end | |
| 166 | ||
| 167 | it ' . Verify t he Follow- Up checkbo x has the right labe l and it i s unchecke d by defau lt' do | |
| 168 | ex pect(@tkli stDetail.f ollowUp_ch ecked?).to eq(false) | |
| 169 | ex pect(@tkli stDetail.f ollowUpLab el).to eq( "Follow-Up Items Onl y") | |
| 170 | end | |
| 171 | end | |
| 172 | ||
| 173 | context 'AC#DCKDA- 612,656|TC #DCKDA-118 2: Reset Filter Fun ctionality ; Filter A ction and Results Di splay' do | |
| 174 | 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 displays c orrectly' do | |
| 175 | @fil ter.resetB ttn | |
| 176 | slee p 0.5 | |
| 177 | expe ct(@filter .startDate ).to eq($t hreeMonths Ago) | |
| 178 | expe ct(@filter .endDate). to eq($tod ayLong) | |
| 179 | @fil ter.filter Bttn | |
| 180 | @com monElement s.noResult FountMsg_e lement.whe n_not_visi ble(timeou t=10) | |
| 181 | expe ct(@common Elements.n oResultFou ntMsg?).to eq(false) | |
| 182 | ||
| 183 | @tkl istDetail. summaryTab le_element .when_visi ble(timeou t=10) | |
| 184 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(1)). to eq("Tit le") | |
| 185 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(2)). to eq("Dat e/Time") | |
| 186 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(3)). to eq("Fol low-Up") | |
| 187 | end | |
| 188 | ||
| 189 | it '. Verify tha t all prep opulated d ata displa y when use r clicks t he filter button' do | |
| 190 | ||
| 191 | list s = [ | |
| 192 | {:valueStr => "Diet plan follo w up - 2, #{$tenDays Ago} 05:00 PM", :has FollowUp = > false}, | |
| 193 | {:valueStr => "Diet plan follo w up - 1, #{$oneMont hAgo} 05:0 0 PM", :ha sFollowUp => true}, | |
| 194 | {:valueStr => "Start a diet pl an, #{$two MonthsAgo} 05:59 PM" , :hasFoll owUp => tr ue} | |
| 195 | ] | |
| 196 | ||
| 197 | list s.each_wit h_index do |listItem , i| | |
| 198 | sl eep 1 | |
| 199 | ex pect(@tkli stDetail.v erifyValue sDisplayRi ghtInTable View(i+1, 3, listIte m[:valueSt r], listIt em[:hasFol lowUp])).t o eq(true) | |
| 200 | end | |
| 201 | end | |
| 202 | ||
| 203 | it '. Verify tha t the list is sorted reverse c hronologic ally.' do | |
| 204 | expe ct(@tklist Detail.ver ifyListAre SortedReve rseChronol ogically(' %m/%d/%Y % I:%M %p', 2, 'kidney tracker')) .to eq(tru e) | |
| 205 | end | |
| 206 | ||
| 207 | it '. Verify tha t by check /unckeck t he follow up checkbo x, the lis t view dis plays diff erent resu lts ' do | |
| 208 | @tkl istDetail. check_foll owUp | |
| 209 | slee p 0.5 | |
| 210 | @fil ter.filter Bttn | |
| 211 | slee p 1 | |
| 212 | Wati r::Wait.un til {@tkli stDetail.s earchThisV alueInAllR ows(3, "ic onYes") == true} | |
| 213 | ||
| 214 | expe ct(@tklist Detail.sea rchThisVal ueInAllRow s(3, "icon Yes")).to eq(true) | |
| 215 | @fil ter.resetB ttn | |
| 216 | slee p 0.5 | |
| 217 | end | |
| 218 | end | |
| 219 | ||
| 220 | context 'AC#DCKDA- 613|TC#DCK DA-1182: N avigation on Phone v iew' do | |
| 221 | 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 | |
| 222 | resi zeWindowTo (320, 480) | |
| 223 | slee p 1 | |
| 224 | expe ct(@common Elements.r eturnToPre vScreen?). to eq(true ) | |
| 225 | expe ct(@common Elements.r eturnToPre vScreen_el ement.attr ibute('tit le')).to e q("Return to Kidney Trackers o ptions") | |
| 226 | end | |
| 227 | ||
| 228 | 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 | |
| 229 | @com monElement s.returnTo PrevScreen | |
| 230 | @com monElement s.secondar yHeader_el ement.when _visible(t imeout=10) | |
| 231 | expe ct(@common Elements.s econdaryHe ader).to e q("Kidney Trackers") | |
| 232 | ||
| 233 | resi zeWindowTo Default() | |
| 234 | end | |
| 235 | end | |
| 236 | ||
| 237 | context 'AC#DCKDA- 612|TC#DCK DA-1182: N o Results found mess age' do | |
| 238 | it '. Verify if no records are found when a fi lter is ap plied the following message is shown in the screen area in p lace of th e table vi ew.' do | |
| 239 | slee p 1 | |
| 240 | @lef tnav.kidne yJournal | |
| 241 | @fil ter.startD ate_elemen t.when_vis ible(timeo ut=10) | |
| 242 | @fil ter.startD ate= '02/0 2/2016' | |
| 243 | @fil ter.endDat e= '05/02/ 2016' | |
| 244 | ||
| 245 | slee p 1 | |
| 246 | @fil ter.filter Bttn | |
| 247 | @com monElement s.noResult FountMsg_e lement.whe n_visible( timeout=10 ) | |
| 248 | 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. ") | |
| 249 | end | |
| 250 | end | |
| 251 | ||
| 252 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.