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 | Blood_Pressure_Pulse_Filter_And_List_DCKDA_456_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 | Blood_Pressure_Pulse_Filter_And_List_DCKDA_456_spec.rb | Tue May 29 15:41:38 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 538 |
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 spec' | |
5 | require 'w atir-webdr iver' | |
6 | ||
7 | require_re lative '.. /rspec_hel per' | |
8 | require_re lative '.. /../lib/pa ges/left_s ide_nav' | |
9 | require_re lative '.. /../lib/pa ges/common _elements' | |
10 | require_re lative '.. /../lib/pa ges/common _tests' | |
11 | require_re lative '.. /../lib/pa ges/filter s' | |
12 | require_re lative '.. /../lib/pa ges/error_ validation s' | |
13 | require_re lative '.. /../lib/pa ges/tracke rs_list_an d_detail' | |
14 | require_re lative '.. /../lib/pa ges/modal_ dialog' | |
15 | require_re lative '.. /../lib/mo dule/FHIRO perationsM odule' | |
16 | ||
17 | describe ' Story#Bloo d_Pressure _Pulse_Fil ter_And_Li st_DCKDA_4 56_spec.rb ', :regres sion => tr ue 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 | { :s ystolic => 90, :dias tolic => 6 0, :pulse => 60, :po sition => "Lying", : effectiveD ateTime => '2017-05- 01T15:00:0 0-04:00'}, | |
30 | { :s ystolic => 180, :dia stolic => 90, :pulse => 50, :p osition => "Sitting" , :effecti veDateTime => '2017- 01-27T16:0 0:00-05:00 '}, | |
31 | { :s ystolic => 190, :dia stolic => 100, :puls e => 70, : position = > "Standin g", :effec tiveDateTi me => '201 6-12-22T16 :01:00-05: 00', :comm ents => 'T his is a c omment'}, | |
32 | ] | |
33 | ||
34 | initia lizeConfig urations() | |
35 | remove BPEntries( patientId, firstName , lastName ) | |
36 | addBPE ntries(ent ries, pati entId, fir stName, la stName) | |
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 | @modal = Modal.n ew(@driver ) | |
45 | ||
46 | @commo nTest.pass ByLandingP ageAndAuth enticate(u serName, p assword, " #{lastName }, #{first Name}", pa tientId) | |
47 | ||
48 | begin | |
49 | Wati r::Wait.un til | |
50 | @com monElement s.angulart itle_eleme nt.visible ? | |
51 | rescue | |
52 | Wati r::Wait::T imeoutErro r | |
53 | unti l | |
54 | @com monElement s.angulart itle_eleme nt.visible ? | |
55 | end | |
56 | end | |
57 | ||
58 | @commo nTest.wait ForContent LoadedSumm aryPage | |
59 | @leftn av.leftSid eNav | |
60 | @leftn av.home_el ement.when _visible | |
61 | ||
62 | $bpCla ssSelector = '.blood -pressure- and-pulse' | |
63 | @commo nTest.navi gateToAsub Feature("K idneyTrack ers", $bpC lassSelect or) | |
64 | @commo nElements. contentLoa ded_elemen t.when_pre sent | |
65 | ||
66 | $today Long = get DateNthDay sAgo(0, "% m/%d/%Y") | |
67 | $yeste rdayShort = getDateN thDaysAgo( 1, "%m/%d/ %y") | |
68 | $yeste rdayLong = getDateNt hDaysAgo(1 , "%m/%d/% Y") | |
69 | $tomor row = getD ateNthDays FromNow(1, "%m/%d/%Y ") | |
70 | $sixYe arsAgo = g etDateNthY earsAgo(6, "%m/%d/%Y ") | |
71 | $sixYe ars1dayAgo = getDate NthDaysAgo (2193, "%m /%d/%Y") | |
72 | $oneYe arAgo = ge tDateNthYe arsAgo(1, "%m/%d/%Y" ) | |
73 | end | |
74 | ||
75 | after(:a ll) do | |
76 | @drive r.close | |
77 | end | |
78 | ||
79 | context 'AC#DCKDA- 636|TC#DCK DA-566: Su b Feature Selection' do | |
80 | it '. Verify sub feature L abel displ ays correc tly' do | |
81 | slee p 3 | |
82 | expe ctedText = @leftnav. getSubFeat ureText($b pClassSele ctor, 'Kid neyTracker s') | |
83 | expe ct(expecte dText).to eq(["Blood Pressure" , "Pulse"] ) | |
84 | end | |
85 | ||
86 | it '. Verify tha t date of the most r ecent trac ker displa ys correct ly' do | |
87 | ||
88 | if $ yesterdayS hort == "0 5/01/17" | |
89 | di splayedDat e = "Yeste rday" | |
90 | else | |
91 | di splayedDat e = "05/01 /17" | |
92 | end | |
93 | ||
94 | @tkl istDetail. summaryTab le_element .when_visi ble(timeou t=10) | |
95 | expe ct(@leftna v.getDispl ayedDateFo rFeature($ bpClassSel ector)).to eq(displa yedDate) | |
96 | ||
97 | @tkl istDetail. addNewEntr y | |
98 | @tkl istDetail. dateOnDeta il = $yest erdayLong | |
99 | @tkl istDetail. timeOnDeta il = "10:0 0 AM" | |
100 | @tkl istDetail. systolic = "110" | |
101 | @tkl istDetail. diastolic = "55" | |
102 | @tkl istDetail. pulse = "5 5" | |
103 | @tkl istDetail. saveBttn_e lement.hov er | |
104 | @tkl istDetail. saveBttn | |
105 | slee p 2 | |
106 | @tkl istDetail. summaryTab le_element .when_visi ble(timeou t=15) | |
107 | expe ct(@leftna v.getDispl ayedDateFo rFeature($ bpClassSel ector)).to eq('Yeste rday') | |
108 | ||
109 | @tkl istDetail. clickAnEnt ryToEditOr Delete(1) | |
110 | @com monElement s.scrollDo wn(@driver ) | |
111 | ||
112 | @tkl istDetail. deleteBttn | |
113 | @mod al.modalTi tle_elemen t.when_vis ible | |
114 | @mod al.yes | |
115 | @com monTest.wa itForConte ntLoaded | |
116 | end | |
117 | ||
118 | it '. Verify tha t the most recent va lue displa ys on the right side of the na v button' do | |
119 | @tkl istDetail. summaryTab le_element .when_visi ble(timeou t=10) | |
120 | read ings = @le ftnav.getD isplayedRe adingForFe ature($bpC lassSelect or).split( "\n") | |
121 | expe ct(reading s[0]).to e q("90/60 m mHg") | |
122 | expe ct(reading s[1].strip ).to eq("6 0 bpm") | |
123 | end | |
124 | ||
125 | it '. Verify tha t Blood Pr essure and Pulse but ton displa ys at the 2nd from t he last it em in the sub-featur e list' do | |
126 | expe ct(@leftna v.isThisFe atureInThe RightPlace (1, $bpCla ssSelector , ["Blood Pressure", "Pulse"], 'KidneyTr ackers')). to eq(true ) | |
127 | end | |
128 | end | |
129 | ||
130 | context 'AC#DCKDA- 627|TC#DCK DA-1185: Sub Featur e Default View (Filt er and Tab le List)' do | |
131 | it '. Verify tha t the deta il screen has the co rrect head er' do | |
132 | @com monElement s.primaryH eader_elem ent.when_v isible(tim eout=10) | |
133 | expe ct(@common Elements.p rimaryHead er).to eq( "Blood Pre ssure and Pulse") | |
134 | end | |
135 | ||
136 | it '. Filter def aults to a n expanded view. Fil ter button alt text reads “C ollapse fi lter optio ns†when expanded. ' do | |
137 | expe ct(@filter .startDate ?).to eq(t rue) | |
138 | expe ct(@filter .filterAcc dBttn_elem ent.attrib ute('title ')).to eq( "Collapse filter opt ions") | |
139 | end | |
140 | ||
141 | 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 “Expa nd filter options.†' do | |
142 | @fil ter.filter AccdBttn | |
143 | @fil ter.startD ate_elemen t.when_not _visible(t imeout=15) | |
144 | expe ct(@filter .filterAcc dBttn_elem ent.attrib ute('title ')).to eq( "Expand fi lter optio ns") | |
145 | end | |
146 | ||
147 | it '. Date Range is defaul t to the p ast 12 mon ths' do | |
148 | @fil ter.filter AccdBttn | |
149 | @fil ter.startD ate_elemen t.when_vis ible(timeo ut=15) | |
150 | expe ct(@filter .startDate ).to eq($o neYearAgo) | |
151 | expe ct(@filter .endDate). to eq($tod ayLong) | |
152 | end | |
153 | ||
154 | it '. Verify Sta rt Date an d End Date label and the requi red field sympol dis play corre ctly ' do | |
155 | expe ct(@filter .getRequir edFieldSym polAndText ("startDat e")).to eq ("*Start D ate:") | |
156 | expe ct(@filter .getRequir edFieldSym polAndText ("endDate" )).to eq(" *End Date: ") | |
157 | end | |
158 | ||
159 | it '. Verify tha t the MM/D D/YYYY dis plays as t he format sample' do | |
160 | expe ct(@filter .startDate _element.a ttribute(' placeholde r')).to eq ("MM/DD/YY YY") | |
161 | expe ct(@filter .endDate_e lement.att ribute('pl aceholder' )).to eq(" MM/DD/YYYY ") | |
162 | end | |
163 | ||
164 | 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 | |
165 | @fil ter.startD ate= "" | |
166 | @fil ter.startD ate= $tomo rrow | |
167 | slee p 0.5 | |
168 | @fil ter.filter Bttn | |
169 | @err or.errorHe ader_eleme nt.when_vi sible | |
170 | errM sg = "Sta rt Date mu st be betw een " + $s ixYearsAgo + " and " + $todayL ong + "." | |
171 | expe ct(@error. isThisErro rDisplayed (errMsg)). to eq(true ) | |
172 | expe ct(@error. isThisErro rDisplayed ("Start Da te must oc cur before End Date. ")).to eq( true) | |
173 | ||
174 | @fil ter.startD ate= "" | |
175 | @fil ter.startD ate= $sixY ears1dayAg o | |
176 | slee p 0.5 | |
177 | @fil ter.filter Bttn | |
178 | @err or.errorHe ader_eleme nt.when_vi sible | |
179 | errM sg = "Star t Date mus t be betwe en " + $si xYearsAgo + " and " + $todayLo ng + "." | |
180 | expe ct(@error. isThisErro rDisplayed (errMsg)). to eq(true ) | |
181 | end | |
182 | ||
183 | it '. Verify tha t the End Date Canno t be futur e date' do | |
184 | @fil ter.endDat e= "" | |
185 | @fil ter.endDat e= $tomorr ow | |
186 | slee p 0.5 | |
187 | @fil ter.filter Bttn | |
188 | @err or.errorHe ader_eleme nt.when_vi sible | |
189 | errM sg = "End Date must be betwee n " + $six YearsAgo + " and " + $todayLon g + "." | |
190 | expe ct(@error. isThisErro rDisplayed (errMsg)). to eq(true ) | |
191 | ||
192 | @fil ter.startD ate= "" | |
193 | @fil ter.endDat e= "" | |
194 | @fil ter.startD ate= $toda yLong | |
195 | @fil ter.endDat e = $yeste rdayLong | |
196 | slee p 0.5 | |
197 | @fil ter.filter Bttn | |
198 | @err or.errorHe ader_eleme nt.when_vi sible | |
199 | expe ct(@error. isThisErro rDisplayed ("Start Da te must oc cur before End Date. ")).to eq( true) | |
200 | end | |
201 | end | |
202 | ||
203 | context 'AC#DCKDA- 638,657|TC #DCKDA-118 5: Reset Filter Fun ctionality ; Filter A ction and Results Di splay' do | |
204 | 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 displayed correctly' do | |
205 | @fil ter.resetB ttn | |
206 | slee p 0.5 | |
207 | expe ct(@filter .startDate ).to eq($o neYearAgo) | |
208 | expe ct(@filter .endDate). to eq($tod ayLong) | |
209 | @fil ter.filter Bttn | |
210 | @com monElement s.noResult FountMsg_e lement.whe n_not_visi ble(timeou t=10) | |
211 | expe ct(@common Elements.n oResultFou ntMsg?).to eq(false) | |
212 | ||
213 | @tkl istDetail. summaryTab le_element .when_visi ble(timeou t=10) | |
214 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(1)). to eq("Sys tolic (mmH g)") | |
215 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(2)). to eq("Dia stolic (mm Hg)") | |
216 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(3)). to eq("Pul se (bpm)") | |
217 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(4)). to eq("Pos ition") | |
218 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(5)). to eq("Dat e/Time") | |
219 | expe ct(@tklist Detail.get ListViewTa bleColumnH eader(6)). to eq("Not e") | |
220 | end | |
221 | ||
222 | it '. Verify tha t all prep opulated d ata displa y when use r clicks t he filter button' do | |
223 | list s = [ | |
224 | { :value Str => '90 , 60, 60, Lying, 05/ 01/2017 03 :00 PM', : hasNote => false }, | |
225 | { :value Str => '18 0, 90, 50, Sitting, 01/27/2017 04:00 PM' , :hasNote => false }, | |
226 | { :value Str => '19 0, 100, 70 , Standing , 12/22/20 16 04:01 P M', :hasNo te => true }, | |
227 | ] | |
228 | ||
229 | list s.each_wit h_index do |listItem , i| | |
230 | sl eep 1 | |
231 | ex pect(@tkli stDetail.v erifyValue sDisplayRi ghtInTable View(i+1, 6, listIte m[:valueSt r], listIt em[:hasNot e])).to eq (true) | |
232 | end | |
233 | end | |
234 | ||
235 | it '. Verify tha t the list is sorted reverse c hronologic ally.' do | |
236 | expe ct(@tklist Detail.ver ifyListAre SortedReve rseChronol ogically(' %m/%d/%Y % I:%M %p', 5, 'kidney tracker')) .to eq(tru e) | |
237 | end | |
238 | end | |
239 | ||
240 | context 'AC#DCKDA- 638,639 |T C#DCKDA-11 85: Naviga tion on Ph one view' do | |
241 | 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 | |
242 | resi zeWindowTo (320, 480) | |
243 | slee p 1 | |
244 | expe ct(@common Elements.r eturnToPre vScreen?). to eq(true ) | |
245 | expe ct(@common Elements.r eturnToPre vScreen_el ement.attr ibute('tit le')).to e q("Return to Kidney Trackers o ptions") | |
246 | expe ct(@tklist Detail.isT hisColumnH idden(4)). to eq("hid den-xs") | |
247 | expe ct(@tklist Detail.isT hisColumnH idden(6)). to eq("hid den-xs") | |
248 | end | |
249 | ||
250 | 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 | |
251 | @com monElement s.returnTo PrevScreen | |
252 | @com monElement s.secondar yHeader_el ement.when _visible(t imeout=10) | |
253 | expe ct(@common Elements.s econdaryHe ader).to e q("Kidney Trackers") | |
254 | ||
255 | resi zeWindowTo Default() | |
256 | end | |
257 | end | |
258 | ||
259 | context 'AC#DCKDA- 638|TC#DCK DA-1185: N o Results found mess age' do | |
260 | 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 | |
261 | @lef tnav.bPAnd P | |
262 | @com monElement s.primaryH eader_elem ent.when_v isible | |
263 | @fil ter.startD ate= $oneY earAgo | |
264 | @fil ter.endDat e= $oneYea rAgo | |
265 | slee p 1 | |
266 | @fil ter.filter Bttn | |
267 | @com monElement s.noResult FountMsg_e lement.whe n_visible | |
268 | 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. ") | |
269 | end | |
270 | end | |
271 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.