Produced by Araxis Merge on 5/29/2018 12:14:36 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\notifications | Notifications_All_Features_Filter_And_List_View_Delete_Notification_DCKDA_1155_1156_1199_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\notifications | Notifications_All_Features_Filter_And_List_View_Delete_Notification_DCKDA_1155_1156_1199_spec.rb | Tue May 29 16:06:16 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 884 |
Changed | 1 | 2 |
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/notifi cations' | |
15 | require_re lative '.. /../lib/pa ges/modal_ dialog' | |
16 | require_re lative '.. /../lib/mo dule/Mongo Operations Module' | |
17 | ||
18 | describe ' Story#DCKD A-1155,115 6,1199 Not ifications _All_Featu res_Filter _And_List_ View_Delet e_Notifica tion_DCKDA _1155_1156 _1199_spec .rb', :reg ression => true do | |
19 | include DriverOper ationsModu le | |
20 | include MongoOpera tionsModul e | |
21 | ||
22 | before(: all) do | |
23 | ||
24 | initia lizeConfig urations() | |
25 | ||
26 | resetC ollection( "notificat ionPrefere nces", "no tification sdb", "spe c/mongoDBD ata/notifi cationsdb/ notificati onPreferen ces.bson") | |
27 | resetC ollection( "preferenc es", "noti ficationsd b", "spec/ mongoDBDat a/notifica tionsdb/pr eferences. bson") | |
28 | resetC ollection( "notificat ions", "no tification sdb", "spe c/mongoDBD ata/notifi cationsdb/ notificati ons.bson") | |
29 | ||
30 | @commo nElements = CommonEl ement.new( @driver) | |
31 | @commo nTest = Co mmonTest.n ew(@driver ) | |
32 | @leftn av = LeftS ideNav.new (@driver) | |
33 | @filte r = Filter s.new(@dri ver) | |
34 | @error = Errors. new(@drive r) | |
35 | @tklis tDetail = TrackerLis tDetail.ne w(@driver) | |
36 | @notif ication = Notificati ons.new(@d river) | |
37 | @modal = Modal.n ew(@driver ) | |
38 | ||
39 | @commonTes t.passByLa ndingPageA ndAuthenti cate(" AI ", " AI ", "patien t13, zztes t", "PATID 12") | |
40 | begin | |
41 | Wati r::Wait.un til | |
42 | @com monElement s.angulart itle_eleme nt.visible ? | |
43 | rescue | |
44 | Wati r::Wait::T imeoutErro r | |
45 | unti l | |
46 | @com monElement s.angulart itle_eleme nt.visible ? | |
47 | end | |
48 | end | |
49 | ||
50 | @commo nTest.wait ForContent LoadedSumm aryPage | |
51 | ||
52 | @leftn av.leftSid eNav_eleme nt.when_vi sible | |
53 | @leftn av.leftSid eNav | |
54 | @leftn av.home_el ement.when _visible | |
55 | ||
56 | @leftn av.clickAp pOptionNam e("Notific ations") | |
57 | @commo nElements. secondaryH eader_elem ent.when_v isible(tim eout=10) | |
58 | @commo nElements. contentLoa ded_elemen t.when_pre sent | |
59 | ||
60 | $today Long = get DateNthDay sAgo(0, "% m/%d/%Y") | |
61 | $yeste rdayLong = getDateNt hDaysAgo(1 , "%m/%d/% Y") | |
62 | $tomor row = getD ateNthDays FromNow(1, "%m/%d/%Y ") | |
63 | $sixYe ars1dayAgo = getDate NthDaysAgo (2193, "%m /%d/%Y") | |
64 | $oneYe arAgo = ge tDateNthYe arsAgo(1, "%m/%d/%Y" ) | |
65 | $thirt yDaysAgo = getDateNt hDaysAgo(3 0, "%m/%d/ %Y") | |
66 | $three HundredDay sAgo = get DateNthDay sAgo(300, "%m/%d/%Y" ) | |
67 | end | |
68 | ||
69 | after(:a ll) do | |
70 | @drive r.close | |
71 | end | |
72 | ||
73 | context 'AC#DCKDA- 487|TC#DCK DA-505: N otificatio ns left pa nel naviga tion group options' do | |
74 | it '. Verify sub features Labels dis play corre ctly' do | |
75 | expe ct(@leftna v.getSubFe atureText( '.all-noti fications' , 'Notific ations')). to eq("All Notificat ions") | |
76 | expe ct(@leftna v.getSubFe atureText( '.mobileki dney-app-n otices', ' Notificati ons')).to eq("Mobile Kidney App Notices") | |
77 | expe ct(@leftna v.getSubFe atureText( '.va-healt h-messages ', 'Notifi cations')) .to eq("VA Health Me ssages") | |
78 | end | |
79 | ||
80 | it '. Verify tha t all sub- features b uttons dis play in th e sub-feat ure list w ith the co rrect orde r' do | |
81 | expe ct(@leftna v.isThisFe atureInThe RightPlace (1, '.all- notificati ons', 'All Notificat ions','Not ifications ')).to eq( true) | |
82 | expe ct(@leftna v.isThisFe atureInThe RightPlace (2, '.mobi lekidney-a pp-notices ', 'Mobile Kidney App Notices', 'Notificat ions')).to eq(true) | |
83 | expe ct(@leftna v.isThisFe atureInThe RightPlace (3, '.va-h ealth-mess ages', 'VA Health Me ssages','N otificatio ns')).to e q(true) | |
84 | end | |
85 | end | |
86 | ||
87 | subFeatu resParam = [ | |
88 | ||
89 | { :A C => 1670, :contextT ext => 'Al l Notifica tions', :f eatureName => 'All N otificatio ns', :feat ureElement Name => '. all-notifi cations' } , | |
90 | { :A C => 1671, :contextT ext => 'Mo bileKidney In-App No tification s', :featu reName => 'MobileKid ney App No tices', :f eatureElem entName => '.mobilek idney-app- notices' } , | |
91 | { :A C => 1672, :contextT ext => 'VA Health Me ssages', : featureNam e => 'VA H ealth Mess ages', :fe atureEleme ntName => '.va-healt h-messages ' }, | |
92 | ||
93 | ] | |
94 | ||
95 | subFeatu resParam.e ach do |fe ature| | |
96 | ||
97 | contex t 'AC#DCKD A-' + feat ure[:AC].t o_s + '|TC #DCKDA-505 : ' + fea ture[:cont extText] d o | |
98 | it ' . Verify t hat the de tail scree n has the correct he ader' do | |
99 | @l eftnav.cli ckSubFeatu reName(fea ture[:feat ureElement Name]) | |
100 | @c ommonEleme nts.conten tLoaded_el ement.when _present(t imeout=10) | |
101 | ex pect(@comm onElements .primaryHe ader).to e q(feature[ :featureNa me]) | |
102 | end | |
103 | ||
104 | it ' . Filter d efaults to an expand ed view. F ilter butt on alt tex t reads †œCollapse filter opt ions†wh en expande d.' do | |
105 | ex pect(@filt er.startDa te?).to eq (true) | |
106 | ex pect(@filt er.filterA ccdBttn_el ement.attr ibute('tit le')).to e q("Collaps e filter o ptions") | |
107 | end | |
108 | ||
109 | it ' . Users ca n collapse the filte r list by clicking o n the Coll apse filte r icon. Wh en collaps ed, the fi lter icon alt text r eads “Ex pand filte r options. â€' do | |
110 | @f ilter.filt erAccdBttn _element.w hen_visibl e(timeout= 10) | |
111 | @f ilter.filt erAccdBttn | |
112 | @f ilter.star tDate_elem ent.when_n ot_visible (timeout=1 5) | |
113 | ex pect(@filt er.filterA ccdBttn_el ement.attr ibute('tit le')).to e q("Expand filter opt ions") | |
114 | end | |
115 | ||
116 | it ' . Date Ran ge is defa ult to the past 30 d ays' do | |
117 | @f ilter.filt erAccdBttn | |
118 | @f ilter.star tDate_elem ent.when_v isible(tim eout=15) | |
119 | ex pect(@filt er.startDa te).to eq( $thirtyDay sAgo) | |
120 | ex pect(@filt er.endDate ).to eq($t odayLong) | |
121 | end | |
122 | ||
123 | it ' . Verify S tart Date and End Da te label a nd the req uired fiel d symbol d isplay cor rectly ' d o | |
124 | ex pect(@filt er.getRequ iredFieldS ympolAndTe xt("startD ate")).to eq("*Start Date:") | |
125 | ex pect(@filt er.getRequ iredFieldS ympolAndTe xt("endDat e")).to eq ("*End Dat e:") | |
126 | end | |
127 | ||
128 | it ' . Verify t hat the MM /DD/YYYY d isplays as the forma t sample' do | |
129 | ex pect(@filt er.startDa te_element .attribute ('placehol der')).to eq("MM/DD/ YYYY") | |
130 | ex pect(@filt er.endDate _element.a ttribute(' placeholde r')).to eq ("MM/DD/YY YY") | |
131 | end | |
132 | ||
133 | it ' . Verify t hat the St art Date C annot be f uture date , cannot b e after th e End date ; date can not be mor e than 1 y ear in the past' do | |
134 | @f ilter.star tDate = "" | |
135 | @f ilter.star tDate = $t omorrow | |
136 | sl eep 0.5 | |
137 | @f ilter.filt erBttn_ele ment.when_ visible(ti meout=10) | |
138 | @f ilter.filt erBttn | |
139 | @e rror.error Header_ele ment.when_ visible | |
140 | er rMsg = "S tart Date must be be tween " + $oneYearAg o + " and " + $today Long + "." | |
141 | ex pect(@erro r.isThisEr rorDisplay ed(errMsg) ).to eq(tr ue) | |
142 | ex pect(@erro r.isThisEr rorDisplay ed("Start Date must occur befo re End Dat e.")).to e q(true) | |
143 | ||
144 | @f ilter.star tDate= $si xYears1day Ago | |
145 | sl eep 0.5 | |
146 | @f ilter.filt erBttn_ele ment.when_ visible(ti meout=10) | |
147 | @f ilter.filt erBttn | |
148 | @e rror.error Header_ele ment.when_ visible | |
149 | ||
150 | er rMsg = "St art Date m ust be for matted MM/ DD/YYYY." | |
151 | ex pect(@erro r.isThisEr rorDisplay ed(errMsg) ).to eq(tr ue) | |
152 | end | |
153 | ||
154 | it ' . Verify t hat the En d Date Can not be fut ure date' do | |
155 | @f ilter.endD ate = "" | |
156 | @f ilter.endD ate = $tom orrow | |
157 | sl eep 0.5 | |
158 | @f ilter.filt erBttn_ele ment.when_ visible(ti meout=10) | |
159 | @f ilter.filt erBttn | |
160 | @e rror.error Header_ele ment.when_ visible | |
161 | er rMsg = "E nd Date mu st be betw een " + $o neYearAgo + " and " + $todayLo ng + "." | |
162 | ex pect(@erro r.isThisEr rorDisplay ed(errMsg) ).to eq(tr ue) | |
163 | ||
164 | @f ilter.star tDate = "" | |
165 | @f ilter.endD ate = "" | |
166 | @f ilter.star tDate = $t odayLong | |
167 | @f ilter.endD ate = $yes terdayLong | |
168 | sl eep 0.5 | |
169 | @f ilter.filt erBttn_ele ment.when_ visible(ti meout=10) | |
170 | @f ilter.filt erBttn | |
171 | @e rror.error Header_ele ment.when_ visible | |
172 | ex pect(@erro r.isThisEr rorDisplay ed("Start Date must occur befo re End Dat e.")).to e q(true) | |
173 | ||
174 | @f ilter.rese tBttn | |
175 | @e rror.error Header_ele ment.when_ not_visibl e(timeout= 10) | |
176 | end | |
177 | end | |
178 | ||
179 | contex t 'AC#DCKD A-' + feat ure[:AC].t o_s + '|TC #DCKDA-505 : ' + fea ture[:cont extText] + '- Source field' do | |
180 | if f eature[:AC ] == 1670 | |
181 | it '. Verify that Sour ce drop do wn list ha s three ch oices; It is default to All No tification s' do | |
182 | expect(@no tification .source).t o eq("All Notificati ons") | |
183 | expect(@no tification .source_op tions.incl ude?("All Notificati ons")).to eq(true) | |
184 | expect(@no tification .source_op tions.incl ude?("Mobi leKidney A pp Notices ")).to eq( true) | |
185 | expect(@no tification .source_op tions.incl ude?("VA H ealth Mess ages")).to eq(true) | |
186 | en d | |
187 | elsi f feature[ :AC] == 16 71 or feat ure[:AC] = = 1672 | |
188 | it '. In ' + feature[: contextTex t] + ', Ve rify that the Source drop down list is r ead only a nd default to ' + fe ature[:fea tureName] do | |
189 | expect(@no tification .source).t o eq(featu re[:featur eName]) | |
190 | expect(@no tification .source_el ement.attr ibute("dis abled")).t o eq("true ") | |
191 | en d | |
192 | end | |
193 | end | |
194 | ||
195 | contex t 'AC#DCKD A-' + feat ure[:AC].t o_s + '|TC #DCKDA-505 : ' + fea ture[:cont extText] + '- Status radio but ton' do | |
196 | it ' . Verify t hat the St atus radio button ha s three ch oices and it is defa ul to All' do | |
197 | ex pect(@noti fication.n otificatio nStatus_se lected?).t o eq("All" ) | |
198 | ex pect(@noti fication.n otificatio nStatus_va lues.inclu de?("Unrea d")).to eq (true) | |
199 | ex pect(@noti fication.n otificatio nStatus_va lues.inclu de?("Read" )).to eq(t rue) | |
200 | end | |
201 | ||
202 | if f eature[:AC ] == 1670 | |
203 | it '. In ' + feature[: contextTex t] + 'Clic k All, Fil ter, and o pen one no tification to read i t; then Se lect Read radio butt on, and cl ick Filter , returns the correc t results' do | |
204 | oneYearPlu sOneDay = (1.year.ag o + 60*60* 24).strfti me(format= "%m/%d/%Y" ) | |
205 | @filter.st artDate = oneYearPlu sOneDay | |
206 | @filter.en dDate_elem ent.send_k eys(:tab) | |
207 | sleep 0.5 | |
208 | @notificat ion.select ARadioButt on("All", "statusOpt ion") | |
209 | @filter.fi lterBttn_e lement.whe n_visible( timeout=10 ) | |
210 | @filter.fi lterBttn_e lement.hov er | |
211 | @filter.fi lterBttn | |
212 | sleep 0.5 | |
213 | Watir::Wai t.until {@ tklistDeta il.text.in clude? "So urce"} | |
214 | @tklistDet ail.summar yTable_ele ment.when_ visible(ti meout=15) | |
215 | ||
216 | @tklistDet ail.clickA nEntryToEd itOrDelete (1) | |
217 | @tklistDet ail.cancel Bttn | |
218 | sleep 0.5 | |
219 | Watir::Wai t.until {@ tklistDeta il.text.in clude? "So urce"} | |
220 | @tklistDet ail.summar yTable_ele ment.when_ visible(ti meout=15) | |
221 | ||
222 | @notificat ion.select ARadioButt on("Read", "statusOp tion") | |
223 | @filter.fi lterBttn_e lement.whe n_visible( timeout=10 ) | |
224 | @filter.fi lterBttn_e lement.hov er | |
225 | @filter.fi lterBttn | |
226 | sleep 0.5 | |
227 | Watir::Wai t.until {@ tklistDeta il.text.in clude? "So urce"} | |
228 | @tklistDet ail.summar yTable_ele ment.when_ visible(ti meout=15) | |
229 | expect(@no tification .getTotalN otificatio nsCount()) .to eq(1) | |
230 | sleep 0.5 | |
231 | @notificat ion.select ARadioButt on("Unread ", "status Option") | |
232 | @filter.fi lterBttn_e lement.whe n_visible( timeout=10 ) | |
233 | @filter.fi lterBttn_e lement.hov er | |
234 | @filter.fi lterBttn | |
235 | sleep 0.5 | |
236 | Watir::Wai t.until {@ tklistDeta il.text.in clude? "So urce"} | |
237 | @tklistDet ail.summar yTable_ele ment.when_ visible(ti meout=15) | |
238 | expect(@no tification .getTotalN otificatio nsCount()) .to eq(2) | |
239 | en d | |
240 | ||
241 | it 'Story#11 56|AC#491| TC#530: Ve rify that all inform ation disp lays on No tification record de tail scree n are corr ect' do | |
242 | @notificat ion.select ARadioButt on("All", "statusOpt ion") | |
243 | @filter.fi lterBttn_e lement.whe n_visible( timeout=10 ) | |
244 | @filter.fi lterBttn_e lement.hov er | |
245 | @filter.fi lterBttn | |
246 | sleep 0.5 | |
247 | Watir::Wai t.until {@ tklistDeta il.text.in clude? "So urce"} | |
248 | @commonEle ments.cont entLoaded_ element.wh en_present (timeout=1 0) | |
249 | @tklistDet ail.clickA nEntryToEd itOrDelete (1) | |
250 | @commonEle ments.cont entLoaded_ element.wh en_present (timeout=1 0) | |
251 | expect(@co mmonElemen ts.primary Header).to eq("View Notificati on") | |
252 | expect(@no tification .notificat ionSource) .to eq("Mo bileKidney - Kidney Trackers") | |
253 | expect(@no tification .systemDat eTime).to eq("02/04/ 2016 03:00 PM") | |
254 | expect(@no tification .timeZone) .to eq("Am erica/New_ York") | |
255 | expect(@no tification .horizaonT alLine?).t o eq(true) | |
256 | expect(@no tification .notificat ionText).t o eq("Dr. Smith") | |
257 | expect(@no tification .cancelBtt n?).to eq( true) | |
258 | en d | |
259 | ||
260 | it 'Story#11 56|AC#493| TC#530: Ve rify that on Notific ation Reco rd Detail screen the < icon is present a nd has the correct a lt text; C lick it re turns to N otificatio n List Scr een' do | |
261 | expect(@co mmonElemen ts.returnT oPrevScree n?).to eq( true) | |
262 | expect(@co mmonElemen ts.returnT oPrevScree n_element. attribute( "title")). to eq("Ret urn to Pre vious Scre en") | |
263 | @commonEle ments.retu rnToPrevSc reen | |
264 | @commonEle ments.cont entLoaded_ element.wh en_present (timeout=1 0) | |
265 | expect(@co mmonElemen ts.primary Header).to eq("All N otificatio ns") | |
266 | en d | |
267 | ||
268 | elsi f feature[ :AC] == 16 71 | |
269 | ||
270 | it '. In ' + feature[: contextTex t] + ' Sel ect Read r adio butto n, then cl ick Filter , returns 1 record' do | |
271 | oneYearPlu sOneDay = (1.year.ag o + 60*60* 24).strfti me(format= "%m/%d/%Y" ) | |
272 | @filter.st artDate = oneYearPl usOneDay | |
273 | ||
274 | @notificat ion.select ARadioButt on("Read", "statusOp tion") | |
275 | @filter.fi lterBttn_e lement.whe n_visible( timeout=10 ) | |
276 | @filter.fi lterBttn_e lement.hov er | |
277 | @filter.fi lterBttn | |
278 | sleep 0.5 | |
279 | Watir::Wai t.until {@ tklistDeta il.text.in clude? "So urce"} | |
280 | @tklistDet ail.summar yTable_ele ment.when_ visible(ti meout=15) | |
281 | ||
282 | expect(@no tification .getTotalN otificatio nsCount()) .to eq(1) | |
283 | @notificat ion.select ARadioButt on("Unread ", "status Option") | |
284 | @filter.fi lterBttn_e lement.whe n_visible( timeout=10 ) | |
285 | @filter.fi lterBttn_e lement.hov er | |
286 | @filter.fi lterBttn | |
287 | sleep 0.5 | |
288 | ||
289 | @tklistDet ail.summar yTable_ele ment.when_ visible(ti meout=15) | |
290 | expect(@no tification .getTotalN otificatio nsCount()) .to eq(1) | |
291 | en d | |
292 | ||
293 | elsi f feature[ :AC] == 16 72 | |
294 | it '. In ' + feature[: contextTex t] + ' Sel ect Read r adio butto n, then cl ick Filter , returns No result found' do | |
295 | oneYearPlu sOneDay = (1.year.ag o + 60*60* 24).strfti me(format= "%m/%d/%Y" ) | |
296 | @filter.st artDate = oneYearPl usOneDay | |
297 | @notificat ion.select ARadioButt on("Read", "statusOp tion") | |
298 | @filter.fi lterBttn_e lement.whe n_visible( timeout=10 ) | |
299 | @filter.fi lterBttn_e lement.hov er | |
300 | @filter.fi lterBttn | |
301 | sleep 0.5 | |
302 | ||
303 | @notificat ion.select ARadioButt on("Unread ", "status Option") | |
304 | @filter.fi lterBttn_e lement.whe n_visible( timeout=10 ) | |
305 | @filter.fi lterBttn_e lement.hov er | |
306 | @filter.fi lterBttn | |
307 | sleep 0.5 | |
308 | Watir::Wai t.until {@ tklistDeta il.text.in clude? "So urce"} | |
309 | @tklistDet ail.summar yTable_ele ment.when_ visible(ti meout=15) | |
310 | expect(@no tification .getTotalN otificatio nsCount()) .to eq(1) | |
311 | en d | |
312 | end | |
313 | end | |
314 | ||
315 | contex t 'AC#DCKD A-' + feat ure[:AC].t o_s + '|TC #DCKDA-505 : ' + fea ture[:cont extText] + '- Data d isplay in the table view' do | |
316 | it ' . Verify t hat the da ta in the table view display a ccurately ' do | |
317 | @n otificatio n.selectAR adioButton ("All", "s tatusOptio n") | |
318 | @f ilter.filt erBttn_ele ment.when_ visible(ti meout=10) | |
319 | @f ilter.filt erBttn_ele ment.hover | |
320 | @f ilter.filt erBttn | |
321 | sl eep 1 | |
322 | @c ommonEleme nts.conten tLoaded_el ement.when _visible | |
323 | ||
324 | te st1 = ["Dr . Smith", "MobileKid ney - Kidn ey Tracker s", "02/04 /2016 03:0 0 PM"] | |
325 | te st2 = ["Yo ur Medicat ion Remind ers goal i s due on K IDNEY", "M obileKidne y - Kidney Trackers" , "02/04/2 016 02:50 PM"] | |
326 | te st3 = ["Te st Reminde r", "VA - Notificati ons", "02/ 04/2016 02 :45 PM"] | |
327 | ||
328 | if feature[: AC] == 167 0 | |
329 | lists = [t est1, test 2, test3] | |
330 | el sif featur e[:AC] == 1671 | |
331 | lists = [t est1, test 2] | |
332 | el sif featur e[:AC] == 1672 | |
333 | lists = [t est3] | |
334 | en d | |
335 | ||
336 | li sts.each_w ith_index do |listIt em, i| | |
337 | if feature [:contextT ext] != 'A ll Notific ations' th en | |
338 | listItem .delete_at (1) | |
339 | end | |
340 | expect(@no tification .verifyNot ificationR ow(i+1, li stItem)).t o eq(true) | |
341 | en d | |
342 | end | |
343 | ||
344 | it ' . Verify t hat the da ta in the table disp lay in the reverse c hronologic al order ' do | |
345 | da teColumn = feature[: contextTex t] == 'All Notificat ions' ? 4 : 3 | |
346 | ex pect(@tkli stDetail.v erifyListA reSortedRe verseChron ologically ('%m/%d/%Y %I:%M %p' , dateColu mn, 'notif ications') ).to eq(tr ue) | |
347 | end | |
348 | ||
349 | it ' . Verify t hat < is s hown on th e list scr een when o n a phone view and t he Status column is hidden' do | |
350 | re sizeWindow To(320, 48 0) | |
351 | sl eep 1 | |
352 | ex pect(@comm onElements .returnToP revScreen? ).to eq(tr ue) | |
353 | ex pect(@comm onElements .returnToP revScreen_ element.at tribute('t itle')).to eq("Retur n to Notif ications o ptions") | |
354 | ex pect(@tkli stDetail.i sThisColum nHidden(1) .include?( "hidden-xs ")).to eq( true) | |
355 | if feature[: contextTex t] == 'All Notificat ions' then | |
356 | expect(@tk listDetail .isThisCol umnHidden( 3).include ?("hidden- xs")).to e q(true) | |
357 | en d | |
358 | end | |
359 | ||
360 | it ' . Verify c licking th e < button returns t o the Main Screen fo r the feat ure where the group options fo r that fea ture are l isted.' do | |
361 | @c ommonEleme nts.return ToPrevScre en | |
362 | @c ommonEleme nts.second aryHeader_ element.wh en_visible (timeout=1 0) | |
363 | ex pect(@comm onElements .secondary Header).to eq("Notif ications") | |
364 | re sizeWindow ToDefault( ) | |
365 | end | |
366 | end | |
367 | ||
368 | contex t 'AC#DCKD A-' + feat ure[:AC].t o_s + '|TC #DCKDA-505 : ' + fea ture[:cont extText] + '- The de fault No r esults fou nd message ' do | |
369 | it ' . Verify i f no recor ds are fou nd when a filter is applied th e message the follow ing messag e is shown in the sc reen area in place o f the tabl e view.' d o | |
370 | @l eftnav.cli ckSubFeatu reName(fea ture[:feat ureElement Name]) | |
371 | on eYearPlusO neDay = (1 .year.ago + 60*60*24 ).strftime (format="% m/%d/%Y") | |
372 | @f ilter.star tDate = o neYearPlus OneDay | |
373 | ||
374 | @f ilter.endD ate = $thr eeHundredD aysAgo | |
375 | sl eep 1 | |
376 | @f ilter.filt erBttn_ele ment.when_ visible(ti meout=10) | |
377 | @f ilter.filt erBttn_ele ment.hover | |
378 | @f ilter.filt erBttn | |
379 | sl eep 30 | |
380 | @c ommonTest. waitForCon tentLoaded | |
381 | end | |
382 | end | |
383 | end | |
384 | ||
385 | context 'Story #DC KDA-1199: Delete Not ification' do | |
386 | it ' . Verify De lete butto n exists i n Notifica tion Detai l view' do | |
387 | @lef tnav.click SubFeature Name(".all -notificat ions") | |
388 | @com monTest.wa itForConte ntLoaded | |
389 | oneY earPlusOne Day = (1.y ear.ago + 60*60*24). strftime(f ormat="%m/ %d/%Y") | |
390 | @fil ter.startD ate = one YearPlusOn eDay | |
391 | ||
392 | @fil ter.endDat e = $today Long | |
393 | @fil ter.filter Bttn_eleme nt.when_vi sible(time out=10) | |
394 | @fil ter.filter Bttn_eleme nt.hover | |
395 | @fil ter.filter Bttn | |
396 | slee p 1 | |
397 | @com monTest.wa itForConte ntLoaded | |
398 | ||
399 | expe ct(@notifi cation.get TotalNotif icationsCo unt()).to eq(3) | |
400 | ||
401 | @tkl istDetail. clickAnEnt ryToEditOr Delete(1) | |
402 | @com monTest.wa itForConte ntLoaded | |
403 | expe ct(@tklist Detail.del eteBttn?). to eq(true ) | |
404 | end | |
405 | ||
406 | it '. Verify cli cking Dele te button opens up C onfirmatio n modal' d o | |
407 | @tkl istDetail. deleteBttn | |
408 | @com monTest.wa itForConte ntLoaded | |
409 | expe ct(@modal. modalTitle ).to eq("C onfirmatio n") | |
410 | expe ct(@modal. modalBody) .to eq("Ar e you sure you want to remove this entry ? Select Y ES to remo ve the ent ry or NO t o return t o the entr y screen." ) | |
411 | expe ct(@modal. ok2?).to e q(true) | |
412 | expe ct(@modal. yes?).to e q(true) | |
413 | expe ct(@modal. ok2_elemen t.text).to eq("No") | |
414 | expe ct(@modal. yes_elemen t.text).to eq("Yes") | |
415 | end | |
416 | ||
417 | it '. Verify cli cking "No" on Confir mation mod al returns user to e ntry scree n' do | |
418 | @mod al.ok2 | |
419 | @com monTest.wa itForConte ntLoaded | |
420 | expe ct(@common Elements.p rimaryHead er).to eq( "View Noti fication") | |
421 | end | |
422 | ||
423 | it '. Verify cli icking "Ye s" on Conf irmation m odal retur ns user to summary v iew with u pdated tab le view' d o | |
424 | @tkl istDetail. cancelBttn _element.s end_keys(: tab) | |
425 | slee p 1 | |
426 | @tkl istDetail. deleteBttn _element.h over | |
427 | @tkl istDetail. deleteBttn | |
428 | @com monTest.wa itForConte ntLoaded | |
429 | @mod al.yes | |
430 | @com monTest.wa itForConte ntLoaded | |
431 | expe ct(@common Elements.p rimaryHead er).to eq( "All Notif ications") | |
432 | expe ct(@notifi cation.get TotalNotif icationsCo unt()).to eq(2) | |
433 | end | |
434 | ||
435 | it '. Verify del eted Notif cation is stored in database w ith delete d flag set ' do | |
436 | docs = getDocu mentByFiel ds("notifi cationsdb" , "notific ations", { "deletedFl ag" => tru e}) | |
437 | expe ct(docs.le ngth).to e q(1) | |
438 | doc = docs[0] | |
439 | expe ct(doc["de letedFlag" ]).to eq(t rue) | |
440 | end | |
441 | end | |
442 | ||
443 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.