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 | Notification_Settings_Initial_Screen_And_Gear_Icon_Screen_DCKDA_1154_1157_458_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 | Notification_Settings_Initial_Screen_And_Gear_Icon_Screen_DCKDA_1154_1157_458_spec.rb | Tue May 29 16:06:25 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 494 |
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/error_ validation s' | |
13 | require_re lative '.. /../lib/pa ges/notifi cations' | |
14 | require_re lative '.. /../lib/pa ges/modal_ dialog' | |
15 | require_re lative '.. /../lib/pa ges/right_ side_nav' | |
16 | require_re lative '.. /../lib/pa ges/user_g uide' | |
17 | require_re lative '.. /../lib/mo dule/Mongo Operations Module' | |
18 | ||
19 | describe ' Story#DCKD A-1154,115 7,458 Noti fication_S ettings_In itial_Scre en_And_Gea r_Icon_Scr een_DCKDA_ 1154_1157_ 458_spec.r b' , :regr ession => true do | |
20 | include DriverOper ationsModu le | |
21 | include MongoOpera tionsModul e | |
22 | ||
23 | before(: all) do | |
24 | ||
25 | initia lizeConfig urations() | |
26 | remove Collection ("notifica tions", "n otificatio nsdb") | |
27 | remove Collection ("reminder s", "remin dersdb") | |
28 | remove Collection ("notifica tionPrefer ences", "n otificatio nsdb") | |
29 | remove Collection ("preferen ces", "not ifications db") | |
30 | ||
31 | @commo nElements = CommonEl ement.new( @driver) | |
32 | @commo nTest = Co mmonTest.n ew(@driver ) | |
33 | @leftn av = LeftS ideNav.new (@driver) | |
34 | @right nav = Righ tSideNav.n ew(@driver ) | |
35 | @userG uide = Use rGuide.new (@driver) | |
36 | @error = Errors. new(@drive r) | |
37 | @tklis tDetail = TrackerLis tDetail.ne w(@driver) | |
38 | @notif ication = Notificati ons.new(@d river) | |
39 | @modal = Modal.n ew(@driver ) | |
40 | ||
41 | @commonTes t.justLogi n(" AI ", " AI ", "patien t14, zztes t", "PATID 13") | |
42 | begin | |
43 | Wati r::Wait.un til | |
44 | @com monElement s.angulart itle_eleme nt.visible ? | |
45 | rescue | |
46 | Wati r::Wait::T imeoutErro r | |
47 | unti l | |
48 | @com monElement s.angulart itle_eleme nt.visible ? | |
49 | end | |
50 | end | |
51 | ||
52 | @commo nElements. contentLoa ded_elemen t.when_pre sent(timeo ut=15) | |
53 | ||
54 | $today Long = get DateNthDay sAgo(0, "% m/%d/%Y") | |
55 | end | |
56 | ||
57 | after(:a ll) do | |
58 | @drive r.close | |
59 | end | |
60 | ||
61 | contex t 'Story#1 154|AC#DCK DA-478|TC# DCKDA-545: Notificat ion displa y for firs t-time use rs ' do | |
62 | it ' . Verify t hat the in itial scre en has the correct w elcome tex t' do | |
63 | ex pect(@noti fication.m odalHeader ).to eq("W elcome zzt est patien t14") | |
64 | end | |
65 | ||
66 | it ' . The inst ructional text displ ay correct ly' do | |
67 | ex pect(@noti fication.i nstruTextO nSettingS1 ).to eq("N otificatio ns include reminder notices yo u create i n this app , as well as Health Messages t hat may be sent to y ou by the Veteran's Administra tion. Whil e you may adjust you r notifica tion deliv ery prefer ences for individual reminders , you must elect to receive He alth Messa ges from t he Veteran 's Adminis tration.") | |
68 | ex pect(@noti fication.i nstruTextO nSettingS2 ).to eq("A s a first time user, please sa ve your No tification Settings before usi ng other a pp feature s. Note th at notific ation sett ings apply to all VA health ap plications .") | |
69 | ex pect(@noti fication.l earnMoreLi nk_element .text.stri p).to eq(" Learn more ") | |
70 | end | |
71 | ||
72 | it ' . Verify t hat clicki ng Learn M ore link o pens up a new learn more page' do | |
73 | @n otificatio n.learnMor eLink_elem ent.when_v isible | |
74 | @n otificatio n.learnMor eLink | |
75 | sw itchWindow ToWindowHa ndleLast() | |
76 | @u serGuide.u serGuideTi tle_elemen t.when_vis ible(timeo ut=10) | |
77 | ex pect(@user Guide.user GuideTitle ).to eq("M obileKidne y User Gui de") | |
78 | sw itchWindow ToWindowHa ndleFirst( ) | |
79 | end | |
80 | ||
81 | it ' . Verify t he Notific ation Sett ing, requi red field indicator, Email Add ress, Time Zone, Opt In all hav e the corr ect label' do | |
82 | ex pect(@noti fication.s ettingLabe l).to eq(" Notificati on Setting s") | |
83 | ex pect(@noti fication.g etRequired FieldText( "initialFo rm")).to e q("* requi red field" ) | |
84 | ex pect(@noti fication.e mailLabel) .to eq("Em ail Addres s:") | |
85 | ex pect(@noti fication.t imeZoneLab el).to eq( "Time Zone :") | |
86 | ex pect(@noti fication.o ptInLabel) .to eq("Re ceive mess ages to he lp improve your heal th:") | |
87 | end | |
88 | ||
89 | it ' . Verify t hat the Em ail field has 100 ma x characte r restrict ion and it display a correct i nstruction al text' d o | |
90 | ex pect(@tkli stDetail.t extareaMax LengthTest (100, fals e, "input" , "email") ).to eq(1) | |
91 | ex pect(@noti fication.e mailInstru TextOnInit Set).to eq ("Your pre ferred ema il for not ifications applies t o all VA H ealth apps . You may modify thi s email un der the Se ttings fea ture shown under Not ifications .") | |
92 | end | |
93 | ||
94 | it ' . Verify t hat the Ti me Zone fi eld is req uired and set to Sel ect as def ault and i t throws a validatio n error wh en left no t selected ' do | |
95 | ex pect(@noti fication.t imeZoneOnS ettings).t o eq("Sele ct") | |
96 | @c ommonEleme nts.saveBt tn | |
97 | @e rror.error Header_ele ment.when_ visible | |
98 | er rMsg = "Ti me Zone fi eld is req uired." | |
99 | ex pect(@erro r.isThisEr rorDisplay ed(errMsg) ).to eq(tr ue) | |
100 | end | |
101 | ||
102 | it ' . Verify t hat the Op t In optio ns radio b utton is s et to Yes as default ' do | |
103 | ex pect(@noti fication.o ptIn_selec ted?).to e q("Yes") | |
104 | end | |
105 | end | |
106 | ||
107 | contex t 'AC#DCKD A-479|TC#D CKDA-545: Left side nav and Ri ght side n av' do | |
108 | it ' . Verify t hat when i nitial set ting modal displays, the left side nav b utton is h idden; Rig ht side na v only sho ws the Abo ut, Launch pad and Lo gout butto ns' do | |
109 | ex pect(@left nav.leftSi deNav_elem ent.attrib ute("class ").include ?("ng-hide ")).to eq( true) | |
110 | @r ightnav.us erMenuBttn | |
111 | @r ightnav.ab out_elemen t.when_vis ible(timeo ut=10) | |
112 | ex pect(@righ tnav.about ?).to eq(t rue) | |
113 | ex pect(@righ tnav.launc hpad?).to eq(true) | |
114 | ex pect(@righ tnav.logou t?).to eq( true) | |
115 | sl eep 1 | |
116 | @r ightnav.us erMenuBttn | |
117 | end | |
118 | end | |
119 | ||
120 | contex t 'AC#DCKD A-479|TC#D CKDA-545: Notificati on Setting s for Save Function' do | |
121 | it ' . Provide email and set Time Z one, then save' do | |
122 | @n otificatio n.emailOnS etting_ele ment.when_ visible(ti meout=10) | |
123 | @n otificatio n.emailOnS etting= "t est@test.c om" | |
124 | sl eep 0.3 | |
125 | @n otificatio n.timeZone OnSettings = "(-05:00 ) America/ New_York ( Eastern)" | |
126 | sl eep 0.3 | |
127 | @c ommonEleme nts.saveBt tn_element .when_visi ble | |
128 | @c ommonEleme nts.saveBt tn | |
129 | sl eep 5 | |
130 | end | |
131 | ||
132 | it ' . Verify f rom mongoD B that the entries h ave been g enerated ' do | |
133 | ex pect(retri eveThisFie ldInDocume nt("prefer ences", "n otificatio nsdb", "ED IPI", "PAT ID13", "ti meZone")). to eq("(-0 5:00) Amer ica/New_Yo rk (Easter n)") | |
134 | ex pect(retri eveThisFie ldInDocume nt("prefer ences", "n otificatio nsdb", "ED IPI", "PAT ID13", "em ailAddress ")).to eq( "test@test .com") | |
135 | end | |
136 | end | |
137 | ||
138 | contex t 'Story#1 157|AC#DCK DA-479|TC# DCKDA-545: Gear Icon - Notific ation Sett ing Modal' do | |
139 | it ' . Modal he ader, Inst ructional text displ ay correct ly' do | |
140 | @c ommonTest. waitForCon tentLoaded SummaryPag e | |
141 | @l eftnav.lef tSideNav_e lement.whe n_visible | |
142 | @l eftnav.lef tSideNav | |
143 | @l eftnav.hom e_element. when_visib le | |
144 | ||
145 | @l eftnav.cli ckAppOptio nName("Not ifications ") | |
146 | @c ommonEleme nts.conten tLoaded_el ement.when _present(t imeout=10) | |
147 | Wa tir::Wait. until {@no tification .text.incl ude? "All Notificati ons"} | |
148 | @n otificatio n.gearIcon _element.w hen_visibl e | |
149 | @n otificatio n.gearIcon | |
150 | @c ommonEleme nts.conten tLoaded_el ement.when _present(t imeout=10) | |
151 | ex pect(@moda l.modalTit le).to eq( "Notificat ion Settin gs") | |
152 | ex pect(@moda l.section1 ).to eq("M anage your Notificat ion prefer ences by a djusting t he setting s options below. Not e that not ification settings a pply to al l VA healt h applicat ions.") | |
153 | end | |
154 | ||
155 | it ' . Verify t he Learn M ore link i s present and clicki ng it dire cts to the Mobile Ki dney User Guide' do | |
156 | ex pect(@noti fication.l earnMoreLi nkOnGear?) .to eq(tru e) | |
157 | @n otificatio n.learnMor eLinkOnGea r | |
158 | sw itchWindow ToWindowHa ndleLast() | |
159 | @u serGuide.u serGuideTi tle_elemen t.when_vis ible(timeo ut=10) | |
160 | ex pect(@user Guide.user GuideTitle ).to eq("M obileKidne y User Gui de") | |
161 | sw itchWindow ToWindowHa ndleFirst( ) | |
162 | end | |
163 | ||
164 | it ' . Verify t he require d field in dicator is present; The email address, T ime Zone a nd Opt In fields all carried t he initial settings over. ' do | |
165 | ex pect(@noti fication.g etRequired FieldText( "settingsF orm")).to eq("* requ ired field ") | |
166 | ex pect(@noti fication.e mailOnSett ing).to eq ("test@tes t.com") | |
167 | ex pect(@noti fication.t imeZoneOnS ettings).t o eq("(-05 :00) Ameri ca/New_Yor k (Eastern )") | |
168 | ex pect(@noti fication.o ptIn_selec ted?).to e q("Yes") | |
169 | end | |
170 | ||
171 | it ' . Email ha s max 100 characters restricti on. Instru ctional te xt display s correctl y' do | |
172 | ex pect(@tkli stDetail.t extareaMax LengthTest (100, fals e, "input" , "email") ).to eq(1) | |
173 | ex pect(@noti fication.e mailInstru TextOnGear Screen).to eq("Your preferred email for notificati ons applie s to all V A Health a pps.") | |
174 | end | |
175 | ||
176 | it ' . Click Ca ncel, it r eturns to the Notifi cation Lis t screen. Make a cha nge, then Save, the change is updated to the mongo DB' do | |
177 | @c ommonEleme nts.cancel Bttn | |
178 | @c ommonEleme nts.conten tLoaded_el ement.when _present(t imeout=10) | |
179 | ex pect(@comm onElements .primaryHe ader).to e q("Notific ations") | |
180 | ||
181 | Wa tir::Wait. until {@no tification .text.incl ude? "All Notificati ons"} | |
182 | sl eep 1 | |
183 | @n otificatio n.gearIcon _element.w hen_visibl e | |
184 | @n otificatio n.gearIcon | |
185 | @c ommonEleme nts.conten tLoaded_el ement.when _present(t imeout=10) | |
186 | @n otificatio n.emailOnS etting= "n ewtest@tes t.com" | |
187 | sl eep 0.3 | |
188 | @c ommonEleme nts.saveBt tn | |
189 | @c ommonEleme nts.conten tLoaded_el ement.when _present(t imeout=10) | |
190 | ex pect(@comm onElements .primaryHe ader).to e q("Notific ations") | |
191 | sl eep 5 | |
192 | ex pect(retri eveThisFie ldInDocume nt("prefer ences", "n otificatio nsdb", "ED IPI", "PAT ID13", "em ailAddress ")).to eq( "newtest@t est.com") | |
193 | end | |
194 | end | |
195 | ||
196 | contex t 'Story#4 58|AC#DCKD A-529|TC#D CKDA-545: Gear Icon - Email no tification error mes sage' do | |
197 | it ' . Create a notificat ion from K idney Trac ker BP&P a rea with e mail deliv ery method ' do | |
198 | sl eep 3 | |
199 | @c ommonTest. navigateTo AsubFeatur e("KidneyT rackers", ".blood-pr essure-and -pulse") | |
200 | @c ommonEleme nts.conten tLoaded_el ement.when _present(t imeout=10) | |
201 | @n otificatio n.notifica tionBttn | |
202 | @c ommonEleme nts.conten tLoaded_el ement.when _present(t imeout=10) | |
203 | @n otificatio n.addANoti fication($ todayLong, "Weekly", ["08:00 A M"], "Emai l") | |
204 | @c ommonEleme nts.conten tLoaded_el ement.when _present(t imeout=15) | |
205 | ex pect(@noti fication.n otificatio nBttnText) .to eq("No tification (On)") | |
206 | sl eep 5 | |
207 | ex pect(retri eveThisFie ldInDocume nt("remind ers", "rem indersdb", "EDIPI", "PATID13", "notifica tionTypes" )).to eq([ "Email"]) | |
208 | end | |
209 | ||
210 | it ' . Remove t he email f rom the se tting page and then click Save . Verify a new modal displays with the c orrect hea der and th e correct content' d o | |
211 | @l eftnav.lef tSideNav | |
212 | @l eftnav.hom e_element. when_visib le | |
213 | @l eftnav.cli ckAppOptio nName("Not ifications ") | |
214 | @n otificatio n.gearIcon | |
215 | @c ommonEleme nts.conten tLoaded_el ement.when _present(t imeout=10) | |
216 | @n otificatio n.emailOnS etting= "" | |
217 | sl eep 0.3 | |
218 | @c ommonEleme nts.saveBt tn | |
219 | Wa tir::Wait. until {@mo dal.warnin gModalTitl e == "Warn ing"} | |
220 | ex pect(@moda l.warningM odalTitle) .to eq("Wa rning") | |
221 | ex pect(@moda l.section1 OnWarning) .to eq("An email add ress is re quired to receive em ail notifi cations. I f you do n ot provide an email address an y future e mail notif ications w ill be can celled.") | |
222 | ex pect(@moda l.section2 OnWarning) .to eq("If you wish to continu e saving, click SAVE , otherwis e, select CANCEL to update you r Notifica tion Setti ngs.") | |
223 | end | |
224 | ||
225 | it ' . Click Ca ncel, Warn ing modal goes away, email sta ys, the No tification Settings screen res ume; Click Save, all modals go away, reo pen Gear I con, verif y that ema il is dele ted. Confi rm that th e email en try in mon gDB is rem oved too.' do | |
226 | @m odal.ok2 | |
227 | Wa tir::Wait. until {@mo dal.modalT itle == "N otificatio n Settings "} | |
228 | ex pect(@moda l.modalTit le).to eq( "Notificat ion Settin gs") | |
229 | ex pect(@noti fication.e mailOnSett ing).to eq ("newtest@ test.com") | |
230 | ||
231 | @n otificatio n.emailOnS etting= "" | |
232 | sl eep 0.3 | |
233 | @c ommonEleme nts.saveBt tn | |
234 | Wa tir::Wait. until {@mo dal.warnin gModalTitl e == "Warn ing"} | |
235 | @m odal.yes | |
236 | @m odal.modal Title_elem ent.when_n ot_visible (timeout=1 0) | |
237 | sl eep 1 | |
238 | ex pect(@moda l.modalTit le?).to eq (false) | |
239 | ||
240 | @n otificatio n.gearIcon | |
241 | @c ommonEleme nts.conten tLoaded_el ement.when _present(t imeout=10) | |
242 | ex pect(@noti fication.e mailOnSett ing).to eq ("") | |
243 | ||
244 | ex pect(retri eveThisFie ldInDocume nt("remind ers", "rem indersdb", "EDIPI", "PATID13", "notifica tionTypes" )).to eq([ ]) | |
245 | end | |
246 | end | |
247 | ||
248 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.