Produced by Araxis Merge on 12/7/2018 11:36:08 AM Central Standard 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 | C:\SCRUB\MHED\MHED\VAR 4.10.0\var-web-release-4.10@e10f18de1ef\veteran-appointment-requests\test\watir-ruby\spec\requests | add_new_express_care_request_limit_spec.rb | Mon Oct 22 23:25:20 2018 UTC |
| 2 | C:\MHED-scrubbed\MHED\MHED\VAR 4.10.0\var-web-release-4.10@e10f18de1ef\veteran-appointment-requests\test\watir-ruby\spec\requests | add_new_express_care_request_limit_spec.rb | Fri Dec 7 13:26:00 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 1188 |
| 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 | require 'r ubygems' | |
| 4 | require 'r spec' | |
| 5 | require 'w atir-webdr iver' | |
| 6 | require 'p age-object ' | |
| 7 | require 'o ci8' | |
| 8 | require 'w atir-scrol l' | |
| 9 | require 'd ate' | |
| 10 | ||
| 11 | require_re lative '.. /../module /DriverUti lity' | |
| 12 | require_re lative '.. /rspec_hel per' | |
| 13 | require_re lative 're quest_help er' | |
| 14 | require_re lative '.. /../pages/ landing' | |
| 15 | require_re lative '.. /../pages/ login' | |
| 16 | require_re lative '.. /../pages/ eula' | |
| 17 | require_re lative '.. /../common /common' | |
| 18 | require_re lative '.. /../pages/ landing_ap pointments ' | |
| 19 | require_re lative '.. /../pages/ appointmen ts/new_app ointment_r equest' | |
| 20 | require_re lative '.. /../pages/ appointmen ts/request _appointme nt_detail' | |
| 21 | require_re lative '.. /../helper /modal' | |
| 22 | require_re lative '.. /../module /database/ OracleUtil ity' | |
| 23 | require_re lative '.. /../module /DateUtili ty' | |
| 24 | require_re lative '.. /../helper /error_val idation' | |
| 25 | require_re lative '.. /../module /database/ MongoUtili ty' | |
| 26 | ||
| 27 | ||
| 28 | ||
| 29 | describe ' [Story#VAR -4635: Ent er Request Details] | |
| 30 | [ Story#VAR- 4638: VAR Request Li mit Integr ation with Utility] | |
| 31 | [ Story#VAR- 4997: Expr ess Care R equest: Su bmit or Ca ncel Reque st] | |
| 32 | [ Story#VAR- 4636: Expr ess Care R equest - V iew Reques t Details] ' do |tim e1, time2| | |
| 33 | include OracleUtil ity | |
| 34 | include DateUtilit y | |
| 35 | include DriverUtil ity | |
| 36 | include MongoUtili ty | |
| 37 | ||
| 38 | before(: all) do | |
| 39 | initia lizeConfig urations(V AR_BASE_UR L) | |
| 40 | @landi ng_appoint ments = La ndingAppoi ntments.ne w(@driver) | |
| 41 | @login = Login.n ew(@driver ) | |
| 42 | @eula = Eula.new (@driver) | |
| 43 | @commo n = Common .new(@driv er) | |
| 44 | @modal = Modal.n ew(@driver ) | |
| 45 | @new_r equest = N ewAppointm entRequest .new(@driv er) | |
| 46 | @detai l = Reques tAppointme ntDetail.n ew(@driver ) | |
| 47 | @error = Error_V alidation. new(@drive r) | |
| 48 | ||
| 49 | @@toda y = getDat eNthDaysFr omNow(0, " %m/%d/%Y") | |
| 50 | ||
| 51 | ||
| 52 | #mongo | |
| 53 | @db = connectToM ongoDB("va r-utility" ) | |
| 54 | restor eCollectio n("siteSup portingVAR ", "var-ut ility", "s ites-suppo rting-var- exported2. json", @db ) | |
| 55 | restor eCollectio n("clinica l-services ", "var-ut ility", "c linical_se rvices_def ault.json" , @db) | |
| 56 | restor eCollectio n("request Eligibilit yCriteria" , "var-uti lity", "re questEligi bilityCrit eria.json" , @db) | |
| 57 | restor eCollectio n("express CareReason ", "var-ut ility", "e xpressCare Reason.jso n", @db) | |
| 58 | #oracl e | |
| 59 | @patie ntID = "10 06088937V0 99668" | |
| 60 | @patie ntID2 = "1 113138327" | |
| 61 | delete PatientDat a(@patient ID) | |
| 62 | delete PatientDat a(@patient ID2) | |
| 63 | ||
| 64 | @@faci lityName = "BOSTON HC S VAMC" | |
| 65 | @@char 250 = "Max Chars50Max Chars50Max Chars50Max Chars50Max Chars50" + "MaxChars 50MaxChars 50MaxChars 50MaxChars 50MaxChars 50" + "Max Chars50Max Chars50Max Chars50Max Chars50Max Chars50" + "MaxChars 50MaxChars 50MaxChars 50MaxChars 50MaxChars 50" + "Ma xChars50Ma xChars50Ma xChars50Ma xChars50Ma xChars50" | |
| 66 | @@new_ message_50 = "012345 6789012345 6789012345 6789012345 6789012345 6789" | |
| 67 | @common.lo ginEndsOnH ome( pw_reda c t e d ) | |
| 68 | @commo n.selectAd dAppointme ntButton(" VA") | |
| 69 | @new_r equest.typ e_of_care_ element.wh en_visible (TIME_OUT_ LIMIT) | |
| 70 | @new_r equest.sel ectTypeOfC are(EXPRES S_CARE) | |
| 71 | @new_r equest.sel ectState(" 523") | |
| 72 | @commo n.waitWhil eSpinnerPr esent() | |
| 73 | @new_r equest.sel ectLocatio n("523") | |
| 74 | @commo n.waitWhil eSpinnerPr esent() | |
| 75 | end | |
| 76 | ||
| 77 | after(:a ll) do | |
| 78 | @drive r.close | |
| 79 | end | |
| 80 | ||
| 81 | context 'AC#VAR-49 49|TC#VAR- 4950: Test New Type of Care - Express Ca re' do | |
| 82 | ||
| 83 | it "Ex press Care is select ed, the Sc heduling M ethod is d efaulted t o 'Submit a Request to VA Sche duler'" do | |
| 84 | expe ct(@new_re quest.sche duling_met hod_radio_ elements[1 ].value).t o eq("cler k") | |
| 85 | expe ct(@new_re quest.sche duling_met hod_radio_ elements[1 ].enabled? ).to eq(tr ue) | |
| 86 | expe ct(@new_re quest.sche duling_met hod_radio_ elements[1 ].selected ?).to eq(t rue) | |
| 87 | expe ct(@new_re quest.requ est_detail s_legend). to eq("Req uest Detai ls - #{EXP RESS_CARE} ") | |
| 88 | end | |
| 89 | ||
| 90 | it "Req uest Detai ls, Reaso n For Visi t" do | |
| 91 | @comm on.waitWhi leSpinnerP resent | |
| 92 | @new_ request.re ason_for_v isit_eleme nt.when_vi sible(TIME _OUT_LIMIT ) | |
| 93 | ||
| 94 | expec ted_conten t =[\ | |
| 95 | "Expre ss Care vi sits are a vailable o nly for ce rtain case s.", | |
| 96 | "* Rea son for Vi sit", | |
| 97 | "Selec t", | |
| 98 | "Aller gies", | |
| 99 | "Cold Symptoms", | |
| 100 | "Ear P roblem", | |
| 101 | "Fever ", | |
| 102 | "Heada che", | |
| 103 | "Itchi ng", | |
| 104 | "Joint Pain", | |
| 105 | "Muscl e Pain", | |
| 106 | "Rash" , | |
| 107 | "Sinus Concerns" , | |
| 108 | "Sleep Issues", | |
| 109 | "Stoma ch/Gastroi ntestinal Issues", | |
| 110 | "Other " | |
| 111 | ] | |
| 112 | ||
| 113 | actua l_content = @new_req uest.reque st_details _section.s plit("\n") | |
| 114 | compa reContents (expected_ content, a ctual_cont ent) | |
| 115 | end | |
| 116 | ||
| 117 | it "Ve rify Reaso n for Visi t Field ha s default value of ' Select'" d o | |
| 118 | ||
| 119 | expec t(@new_req uest.reaso n_for_visi t).to eq(" Select") | |
| 120 | end | |
| 121 | ||
| 122 | it "Ve rify Reaso n for Visi t Field is required" do | |
| 123 | ||
| 124 | @new_ request.cl ickSubmitR equest | |
| 125 | verif yErrorMess age("Reaso n for Visi t field is required. ") | |
| 126 | end | |
| 127 | ||
| 128 | it "Ve rify Max C haracter l ength for reason for visit 'Ot her'" do | |
| 129 | ||
| 130 | @new_ request.re ason_for_v isit = "Ot her" | |
| 131 | @new_ request.re ason_for_v isit_eleme nt.fire_ev ent('onblu r') | |
| 132 | @new_ request.ot her_reason _for_visit _element.w hen_visibl e(TIME_OUT _LIMIT) | |
| 133 | @new_ request.ot her_reason _for_visit = "MaxCha rs50MaxCha rs50MaxCha rs50MaxCha rs50MaxCha rs50" + "1 234" | |
| 134 | expec t(@new_req uest.other _reason_fo r_visit).t o eq("MaxC hars50MaxC hars50MaxC hars50MaxC hars50MaxC hars50") | |
| 135 | expec t(@new_req uest.other _reason_fo r_visit.le ngth).to e q(50) | |
| 136 | #work around | |
| 137 | end | |
| 138 | ||
| 139 | it "Add itional in fo - 250 c haracters remaining default me ssage" do | |
| 140 | @new_ request.ot her_reason _for_visit _element.c lick | |
| 141 | expec t(@new_req uest.other _reason_fo r_visit).t o eq("MaxC hars50MaxC hars50MaxC hars50MaxC hars50MaxC hars50") | |
| 142 | expec t(@new_req uest. addi tional_inf o_message_ counter).t o eq("250 characters remaining ") | |
| 143 | end | |
| 144 | ||
| 145 | it "Ad ditional i nfo - 250 characters verify re maining ch aracter co unt to 0" do | |
| 146 | ||
| 147 | @new_ request.ad ditional_i nformation = @@char2 50 | |
| 148 | expec t(@new_req uest.addit ional_info rmation).t o eq(@@cha r250) | |
| 149 | expec t(@new_req uest. addi tional_inf o_message_ counter).t o eq("0 ch aracters r emaining") | |
| 150 | end | |
| 151 | ||
| 152 | it "Ad ditional i nfo - 250 characters verify le ngth" do | |
| 153 | ||
| 154 | char2 60 = @@cha r250 + "01 23456789" | |
| 155 | @new_ request.ad ditional_i nformation = char260 | |
| 156 | expec t(@new_req uest.addit ional_info rmation).t o eq(@@cha r250) | |
| 157 | expec t(@new_req uest.addit ional_info rmation_el ement.attr ibute("pla ceholder") ).to eq("P rovide any additiona l details regarding your reaso n for requ esting thi s visit.") | |
| 158 | ||
| 159 | end | |
| 160 | ||
| 161 | it "Co mmunicatin g with a S cheduling Clerk Abou t this Req eust" do | |
| 162 | expe cted_conte nt =[\ | |
| 163 | "Commu nicating w ith a Sche duling Cle rk About t his Reques t", | |
| 164 | "Pleas e provide your phone informati on in case we need t o contact you.", | |
| 165 | "If yo u would li ke to talk with VA, you may as k a clerk to call yo u, or you may messag e a clerk through th is app.", | |
| 166 | "* Pho ne:", | |
| 167 | "Phone field is required." , | |
| 168 | "* Ver ify Phone: ", | |
| 169 | "Verif y Phone fi eld is req uired.", | |
| 170 | "* Bes t Times fo r VA to Ca ll:", | |
| 171 | "Morni ng", | |
| 172 | "After noon", | |
| 173 | "Eveni ng", | |
| 174 | "Best Times for VA to Call field is required." , | |
| 175 | "Would you like the VA to call you r egarding t his reques t?", | |
| 176 | "Yes", | |
| 177 | "No" | |
| 178 | ] | |
| 179 | ||
| 180 | actu al_content = @new_re quest.comm unicating_ section.sp lit("\n") | |
| 181 | comp areContent s(expected _content, actual_con tent) | |
| 182 | end | |
| 183 | ||
| 184 | it "Ph one, Best Time to ca ll default s" do | |
| 185 | expe ct(@new_re quest.phon eNumber_el ement.visi ble?).to e q(true) | |
| 186 | expe ct(@new_re quest.veri fyPhoneNum ber_elemen t.visible? ).to eq(tr ue) | |
| 187 | expe ct(@new_re quest.best TimeToCall _morning_e lement.vis ible?).to eq(true) | |
| 188 | end | |
| 189 | ||
| 190 | it "Ph one, Best Time to ca ll require d error me ssage" do | |
| 191 | ||
| 192 | @new _request.c lickSubmit Request | |
| 193 | veri fyErrorMes sage("Phon e field is required. ") | |
| 194 | veri fyErrorMes sage("Veri fy Phone f ield is re quired.") | |
| 195 | end | |
| 196 | ||
| 197 | it "Ve rify auto format pho ne field" do | |
| 198 | ||
| 199 | @new _request.p honeNumber = "703222 3333" | |
| 200 | @new _request.p honeNumber _element.f ire_event( 'onblur') | |
| 201 | expe ct(@new_re quest.phon eNumber).t o eq("(703 ) 222-3333 ") | |
| 202 | end | |
| 203 | ||
| 204 | it "Ve rify auto format pho ne field f or abc" do | |
| 205 | @new _request.p honeNumber = "111Abc 1111111" | |
| 206 | @new _request.p honeNumber _element.f ire_event( 'onblur') | |
| 207 | expe ct(@new_re quest.phon eNumber).t o eq("(111 ) 111-1111 ") | |
| 208 | end | |
| 209 | ||
| 210 | it "Pl ease enter a valid U S Phone nu mber" do | |
| 211 | ||
| 212 | butt on_element = @driver .button(:i d => 'sche dule-appoi ntment-btn ') | |
| 213 | @dri ver.execut e_script(" $(argument s[0]).clic k();",butt on_element ) | |
| 214 | veri fyErrorMes sage("Plea se enter a valid US Phone numb er.") | |
| 215 | end | |
| 216 | ||
| 217 | it "Th e phone nu mbers do n ot match." do | |
| 218 | ||
| 219 | @new _request.p honeNumber = "703222 3333" | |
| 220 | @new _request.p honeNumber _element.f ire_event( 'onblur') | |
| 221 | @new _request.v erifyPhone Number = " 1112223333 " | |
| 222 | @new _request.v erifyPhone Number_ele ment.fire_ event('onb lur') | |
| 223 | @new _request.c lickSubmit Request | |
| 224 | veri fyErrorMes sage("The phone numb ers do not match.") | |
| 225 | end | |
| 226 | ||
| 227 | it "Be st Times f or VA to C all field is require d." do | |
| 228 | ||
| 229 | @new _request.v erifyPhone Number = " 7032223333 " | |
| 230 | @new _request.v erifyPhone Number_ele ment.fire_ event('onb lur') | |
| 231 | @new _request.c lickSubmit Request | |
| 232 | veri fyErrorMes sage("Best Times for VA to Cal l field is required. ") | |
| 233 | ||
| 234 | end | |
| 235 | ||
| 236 | it "Re vise best time to ca ll options " do | |
| 237 | @new _request.c heck_bestT imeToCall_ morning | |
| 238 | @new _request.c heck_bestT imeToCall_ afternoon | |
| 239 | @new _request.c heck_bestT imeToCall_ evening | |
| 240 | ||
| 241 | @new _request.u ncheck_bes tTimeToCal l_afternoo n | |
| 242 | @new _request.u ncheck_bes tTimeToCal l_evening | |
| 243 | ||
| 244 | expe ct(@new_re quest.best TimeToCall _morning_c hecked?).t o eq(true) | |
| 245 | expe ct(@new_re quest.best TimeToCall _afternoon _checked?) .to eq(fal se) | |
| 246 | expe ct(@new_re quest.best TimeToCall _evening_c hecked?).t o eq(false ) | |
| 247 | ||
| 248 | end | |
| 249 | ||
| 250 | it "VA to call r eagrding t his reques t default selection" do | |
| 251 | expe ct(@new_re quest.requ estedPhone Call_selec ted?).to e q("false") | |
| 252 | end | |
| 253 | ||
| 254 | it "VA to call r eagrding t his reques t default selection select Yes " do | |
| 255 | ||
| 256 | @new _request.r equestedPh oneCall_ye s_element. click | |
| 257 | expe ct(@new_re quest.requ estedPhone Call_selec ted?).to e q("true") | |
| 258 | end | |
| 259 | ||
| 260 | it "VA to call r eagrding t his reques t default selection select No" do | |
| 261 | ||
| 262 | @new _request.r equestedPh oneCall_no _element.c lick | |
| 263 | expe ct(@new_re quest.requ estedPhone Call_selec ted?).to e q("false") | |
| 264 | end | |
| 265 | ||
| 266 | it "VA to call r eagrding t his reques t default selection select Yes " do | |
| 267 | ||
| 268 | @new _request.r equestedPh oneCall_ye s_element. click | |
| 269 | expe ct(@new_re quest.requ estedPhone Call_selec ted?).to e q("true") | |
| 270 | end | |
| 271 | ||
| 272 | it "Me ssage a Sc heduling C lerk defau lts" do | |
| 273 | expe ct(@new_re quest.mess age_header ).to eq("M essage a S cheduling Clerk") | |
| 274 | expe ct(@new_re quest.new_ message_el ement.attr ibute("pla ceholder") ).to eq("M essages (1 00 charact ers max) s hould not be used fo r cancelli ng an appo intment or for clini cal questi ons that m ay need pr ovider att ention.") | |
| 275 | expe ct(@new_re quest.mess age_counte r).to eq(" 100 charac ters remai ning") | |
| 276 | end | |
| 277 | ||
| 278 | it "Me ssage a Sc heduling C lerk 100 c haracter l imit cooun t update t o 50" do | |
| 279 | ||
| 280 | @new _request.n ew_message = @@new_m essage_50 | |
| 281 | expe ct(@new_re quest.mess age_counte r).to eq(" 50 charact ers remain ing") | |
| 282 | end | |
| 283 | ||
| 284 | it "Me ssage a Sc heduling C lerk 100 c haracter l imit cooun t update t o 0" do | |
| 285 | @new _request.n ew_message = @@new_m essage_50 + @@new_me ssage_50 | |
| 286 | expe ct(@new_re quest.new_ message).t o eq(@@new _message_5 0 + @@new_ message_50 ) | |
| 287 | expe ct(@new_re quest.mess age_counte r).to eq(" 0 characte rs remaini ng") | |
| 288 | end | |
| 289 | ||
| 290 | it "Me ssage a Sc heduling C lerk 100 c haracter l imit, no e xtra chara cters acce pted" do | |
| 291 | ||
| 292 | @new _request.n ew_message = @@new_m essage_50 + @@new_me ssage_50 + "!!@#!@#! @#%^^" | |
| 293 | expe ct(@new_re quest.new_ message).t o eq(@@new _message_5 0 + @@new_ message_50 ) | |
| 294 | end | |
| 295 | ||
| 296 | it "Sh ould verif y 0 charac ters remai ning messa ge for mes saging a s cheduling clerk" do | |
| 297 | @new _request.n ew_message _element.f ire_event( 'onblur') | |
| 298 | expe ct(@new_re quest.mess age_counte r).to eq(" 0 characte rs remaini ng") | |
| 299 | end | |
| 300 | ||
| 301 | it "No tification Settings" do | |
| 302 | expe cted_conte nt =[\ | |
| 303 | "Notif ication Se ttings", | |
| 304 | "Expre ss Care vi sits requi re an emai l address so that we may email or text y ou about y our care v isit.", | |
| 305 | "Pleas e confirm your notif ication co ntact info rmation be fore submi tting this request." , | |
| 306 | "* Ema il:" | |
| 307 | ] | |
| 308 | ||
| 309 | actu al_content = @new_r equest.not ification_ section.sp lit("\n") | |
| 310 | comp areContent s(expected _content, actual_con tent) | |
| 311 | end | |
| 312 | ||
| 313 | it "Em ail field is require d" do | |
| 314 | @new _request.c lickSubmit Request | |
| 315 | veri fyErrorMes sage("Emai l field is required. ") | |
| 316 | end | |
| 317 | ||
| 318 | it "Pr ovide Emai l Address" do | |
| 319 | @new _request.e mail = "me era.cho@ac centurefed eral.com" | |
| 320 | @new _request.e mail_eleme nt.fire_ev ent('onblu r') | |
| 321 | expe ct(@new_re quest.emai l).to eq(" meera.cho@ accenturef ederal.com ") | |
| 322 | ||
| 323 | end | |
| 324 | ||
| 325 | end | |
| 326 | ||
| 327 | context "AC#VAR-51 92|TC#VAR- 5193: Test Express C are Reques t: Submit or Cancel" do | |
| 328 | it "Su bmit Reque st and Can cel Button text" do | |
| 329 | expe ct(@new_re quest.sche dule_appoi ntment_ele ment.text) .to eq("Su bmit Reque st") | |
| 330 | expe ct(@new_re quest.canc el_element .text).to eq("Cancel ") | |
| 331 | end | |
| 332 | ||
| 333 | it "Su bmit Reque st Details " do | |
| 334 | ||
| 335 | @new _request.c lickSubmit Request | |
| 336 | time 1 = Time.n ow.strftim e("%H:%M") | |
| 337 | @com mon.waitWh ileSpinner Present | |
| 338 | @det ail.status _element.w hen_presen t(TIME_OUT _LIMIT) | |
| 339 | expe ct(@detail .has_expec ted_title? ).to eq(tr ue) | |
| 340 | expe ct(@detail .status_el ement.text ).to eq("S tatus: Sub mitted") | |
| 341 | expe ct(@detail .provide_f eedback_li nk_element .text).to eq("Provid e feedback on this s ubmission. ") | |
| 342 | expe ct(@detail .status_la st_updated _element.t ext).to in clude("Upd ated: " + @@today) | |
| 343 | expe ct(@detail .status_de sc_element .text).to eq("View s tatus upda tes for th is request under the \"Request s\" sectio n of the H ome page. Once sched uled, the resulting appointmen t will be available in the VA Video Appo intment ap p.") | |
| 344 | ||
| 345 | end | |
| 346 | ||
| 347 | it "Cl ick Video Visit, ver ify rerout e message and return option" d o | |
| 348 | @det ail.video_ appointmen t_link_ele ment.click | |
| 349 | @mod al.modalTi tle_elemen t.when_pre sent(TIME_ OUT_LIMIT) | |
| 350 | expe ct(@modal. modalTitle ).to eq("C onfirmatio n") | |
| 351 | expe ct(@modal. content).t o eq("You are about to leave t he VA Appo intments a pp. Select CONTINUE to proceed to the li nk informa tion selec ted, or se lect RETUR N to retur n to the V A Appointm ents app." ) | |
| 352 | expe ct(@modal. buttons_el ements[1]. text).to e q("Return" ) | |
| 353 | end | |
| 354 | ||
| 355 | it "Cl ick Video Visit, ver ify rerout e message and contin ue option" do | |
| 356 | @mod al.buttons _elements[ 1].click | |
| 357 | @det ail.video_ appointmen t_link_ele ment.click | |
| 358 | @mod al.modalTi tle_elemen t.when_pre sent(TIME_ OUT_LIMIT) | |
| 359 | expe ct(@modal. modalTitle ).to eq("C onfirmatio n") | |
| 360 | expe ct(@modal. content).t o eq("You are about to leave t he VA Appo intments a pp. Select CONTINUE to proceed to the li nk informa tion selec ted, or se lect RETUR N to retur n to the V A Appointm ents app." ) | |
| 361 | expe ct(@modal. buttons_el ements[0]. text).to e q("Continu e") | |
| 362 | end | |
| 363 | ||
| 364 | it "Ve rify reque st Details Status" d o | |
| 365 | @mod al.buttons _elements[ 0].click | |
| 366 | swit chWindowTo WindowHand leFirst() | |
| 367 | expe ct(@detail .back_labe l).to eq(" Appointmen ts/Request s") | |
| 368 | expe ct(@detail .back_btn_ element.vi sible?).to eq(true) | |
| 369 | expe ct(@detail .back_btn_ element.at tribute("a ria-label" )).to eq(" Return to Appointmen ts and Req uests") | |
| 370 | expe ct(@detail .status_el ement.text ).to eq("S tatus: Sub mitted") | |
| 371 | expe ct(@detail .provide_f eedback_li nk_element .text).to eq("Provid e feedback on this s ubmission. ") | |
| 372 | expe ct(@detail .status_la st_updated _element.t ext).to in clude("Upd ated: " + @@today) | |
| 373 | expe ct(@detail .status_de sc_element .text).to eq("View s tatus upda tes for th is request under the \"Request s\" sectio n of the H ome page. Once sched uled, the resulting appointmen t will be available in the VA Video Appo intment ap p.") | |
| 374 | end | |
| 375 | ||
| 376 | it "Ve rify reque st Details Location, Type of C are and co ntact info rmation" d o | |
| 377 | ||
| 378 | char 250 = "Max Chars50Max Chars50Max Chars50Max Chars50Max Chars50" + "MaxChars 50MaxChars 50MaxChars 50MaxChars 50MaxChars 50" + "Max Chars50Max Chars50Max Chars50Max Chars50Max Chars50" + "MaxChars 50MaxChars 50MaxChars 50MaxChars 50MaxChars 50" + "Ma xChars50Ma xChars50Ma xChars50Ma xChars50Ma xChars50" | |
| 379 | ||
| 380 | expe cted_detai ls = [\ | |
| 381 | "R equest Det ails", | |
| 382 | "S ubmitted: " + @@toda y + " @ " + time1 + " Locatio n: #{@@fac ilityName} " + " Type of Care: #{EXPRESS_ CARE}" + " Preferenc e: Call be fore booki ng appoint ment" + " Reason for Visit: Ot her" + " O ther Reaso n for Visi t: MaxChar s50MaxChar s50MaxChar s50MaxChar s50MaxChar s50" + " A dditional Informatio n: " + cha r250, | |
| 383 | "Y our Contac t Informat ion", | |
| 384 | "P hone (703) 222-3333 Best Times for VA to Call Morn ing" | |
| 385 | ] | |
| 386 | actu al_text = @detail.re quest_deta ils_group_ element.te xt.split(" \n") | |
| 387 | comp areContent s(expected _details, actual_tex t) | |
| 388 | end | |
| 389 | ||
| 390 | it "Ve rify Messa ge a sched uing clerk section d etails" do | |
| 391 | expe cted_commu nicating_w ith_clerk= [\ | |
| 392 | "Message a Schedulin g Clerk", | |
| 393 | "You may s end up to two (2) me ssages whi le this re quest is i n Submitte d status. If you nee d addition al informa tion, plea se call yo ur local V A Medical Center" | |
| 394 | ] | |
| 395 | actu al_text = @detail.co mmunicate_ with_clerk _group_ele ment.text. split("\n" ) | |
| 396 | expe cted_commu nicating_w ith_clerk. each_with_ index do | expectedS creenRow, i | | |
| 397 | ex pect(actua l_text[i]) .to eq(exp ectedScree nRow) | |
| 398 | ||
| 399 | end | |
| 400 | ||
| 401 | end | |
| 402 | ||
| 403 | it "Ca ncel Reque st confirm ation dial ogue detai ls and No option" do | |
| 404 | @det ail.back_b tn | |
| 405 | @com mon.waitWh ileSpinner Present | |
| 406 | @com mon.select AddAppoint mentButton ("VA") | |
| 407 | @new _request.s electTypeO fCare(EXPR ESS_CARE) | |
| 408 | @new _request.s electState ("523") | |
| 409 | @new _request.s electLocat ion("523") | |
| 410 | @new _request.c ancel_elem ent.when_v isible(TIM E_OUT_LIMI T) | |
| 411 | @new _request.c ancel | |
| 412 | @mod al.modalTi tle_elemen t.when_pre sent(TIME_ OUT_LIMIT) | |
| 413 | expe ct(@modal. modalTitle ).to eq("C ancel Conf irmation") | |
| 414 | expe ct(@modal. content).t o eq("Are you sure y ou want to cancel th is request ?") | |
| 415 | expe ct(@modal. buttons_el ements[1]. text).to e q("No") | |
| 416 | end | |
| 417 | ||
| 418 | it "Ca ncel Reque st confirm ation dial ogue displ ayed" do | |
| 419 | @mod al.buttons _elements[ 1].click | |
| 420 | expe ct(@new_re quest.canc el_element .visible?) .to eq(tru e) | |
| 421 | end | |
| 422 | it "Ca ncel Reque st confirm ation dial ogue detai ls and Yes option" d o | |
| 423 | @new _request.c ancel | |
| 424 | @mod al.modalTi tle_elemen t.when_pre sent(TIME_ OUT_LIMIT) | |
| 425 | expe ct(@modal. modalTitle ).to eq("C ancel Conf irmation") | |
| 426 | expe ct(@modal. buttons_el ements[0]. text).to e q("Yes") | |
| 427 | end | |
| 428 | ||
| 429 | it "Su ccessfully cancel cr eating a r equest" do | |
| 430 | @mod al.buttons _elements[ 0].click | |
| 431 | @com mon.waitWh ileSpinner Present | |
| 432 | Wati r::Wait.un til { @lan ding_appoi ntments.ad d_top_btn_ element.pr esent? } | |
| 433 | @lan ding_appoi ntments.ad d_top_btn_ element.wh en_present (TIME_OUT_ LIMIT) | |
| 434 | expe ct(@landin g_appointm ents.add_t op_btn_ele ment.prese nt?).to eq (true) | |
| 435 | ||
| 436 | end | |
| 437 | end | |
| 438 | ||
| 439 | context "AC#VAR-51 53|TC#VAR- 5154: Val idate Inte gration of VAR Reque stLimit wi th Utility " do | |
| 440 | ||
| 441 | it "Ty pe of Care drop down order mat ches utili ty order ( e.g. Prima ry Care is shown fir st followe d by other types of care liste d in alpha betical or der)" do | |
| 442 | @com mon.select AddAppoint mentButton ("VA") | |
| 443 | @new _request.s tep_1_type _of_care_e lement.whe n_visible( TIME_OUT_L IMIT) | |
| 444 | expe ct(@new_re quest.type _of_care_o ptions).to eq(["Sele ct", PRIMA RY_CARE, A UDIOLOGY, EXPRESS_CA RE, OPTOME TRY, MENTA L_HEALTH ] ) | |
| 445 | ||
| 446 | end | |
| 447 | ||
| 448 | it "su bmit an ex press care request" do | |
| 449 | @new _request.s electTypeO fCare(EXPR ESS_CARE) | |
| 450 | @new _request.s electState ("523") | |
| 451 | @com mon.waitWh ileSpinner Present() | |
| 452 | @new _request.s electLocat ion("523") | |
| 453 | @new _request.a ddExpressC are | |
| 454 | @det ail.status _element.w hen_presen t(TIME_OUT _LIMIT) | |
| 455 | expe ct(@detail .has_expec ted_title? ).to eq(tr ue) | |
| 456 | expe ct(@detail .status_el ement.text ).to eq("S tatus: Sub mitted") | |
| 457 | expe ct(@detail .status_la st_updated _element.t ext).to in clude("Upd ated: " + @@today) | |
| 458 | expe ct(@detail .provide_f eedback_li nk_element .text).to eq("Provid e feedback on this s ubmission. ") | |
| 459 | end | |
| 460 | ||
| 461 | it "Li mit of the submitted requests has been r eached" do | |
| 462 | time 2 = Time.n ow.strftim e("%H:%M") | |
| 463 | @det ail.back_b tn | |
| 464 | @com mon.waitWh ileSpinner Present | |
| 465 | @com mon.select AddAppoint mentButton ("VA") | |
| 466 | @new _request.s electTypeO fCare(EXPR ESS_CARE) | |
| 467 | @new _request.s electState ("523") | |
| 468 | @new _request.s electLocat ion("523") | |
| 469 | @com mon.waitWh ileSpinner Present() | |
| 470 | ||
| 471 | expe cted_conte nt =[\ | |
| 472 | "Step 4: Schedul ing Method ", | |
| 473 | "The l ocation yo u selected supports the follow ing schedu ling metho ds:", | |
| 474 | "* Sel ect a sche duling met hod:", | |
| 475 | "Sched ule Myself ", | |
| 476 | "This method is not availa ble for th e type of care you s elected.", | |
| 477 | "Submi t a Reques t to VA Sc heduler", | |
| 478 | "You h ave reache d the limi t of 2 Exp ress Care request(s) .", | |
| 479 | "In or der to pro ceed, plea se cancel a pending request, o r wait for the VA to process a request." | |
| 480 | ] | |
| 481 | ||
| 482 | actu al_content = @new_re quest.sche duling_met hod_sectio n.split("\ n") | |
| 483 | comp areContent s(expected _content, actual_con tent) | |
| 484 | ||
| 485 | end | |
| 486 | end | |
| 487 | ||
| 488 | context "AC#VAR-51 98|TC#VAR- 5199: Val idate Expr ess Care R equest - V iew Reques t Details , Cancel R equest" do | |
| 489 | it "Vi ew Request Details H eader" do | |
| 490 | @new _request.b ack_btn | |
| 491 | @mod al.modalTi tle_elemen t.when_pre sent(TIME_ OUT_LIMIT) | |
| 492 | @mod al.buttons _elements[ 0].click | |
| 493 | expe ct(@landin g_appointm ents.prima ry_header) .to eq("Ap pointments /Requests" ) | |
| 494 | end | |
| 495 | ||
| 496 | it "Ve rify reque sts status in list" do | |
| 497 | Wati r::Wait.un til {@land ing_appoin tments.req uest_table _list_elem ents.lengt h > 1} | |
| 498 | requ est_detail s = @landi ng_appoint ments.requ est_table_ list_eleme nts[0] | |
| 499 | requ est_detail s.scroll.t o :top | |
| 500 | Wati r::Wait.un til {@land ing_appoin tments.get RequestTex tForRowCol (2,2) == " Submitted" } | |
| 501 | expe ct(@landin g_appointm ents.getRe questTextF orRowCol(1 ,2)).to eq ("Submitte d") | |
| 502 | expe ct(@landin g_appointm ents.getRe questTextF orRowCol(2 ,2)).to eq ("Submitte d") | |
| 503 | end | |
| 504 | ||
| 505 | it "Ve rify Submi tted reque st details status an d instruct ional text " do | |
| 506 | @lan ding_appoi ntments.re quest_tabl e_list_ele ments[0].c lick | |
| 507 | @det ail.status _element.w hen_presen t(TIME_OUT _LIMIT) | |
| 508 | expe ct(@detail .has_expec ted_title? ).to eq(tr ue) | |
| 509 | expe ct(@detail .status_el ement.text ).to eq("S tatus: Sub mitted") | |
| 510 | expe ct(@detail .status_la st_updated _element.t ext).to in clude("Upd ated: " + @@today) | |
| 511 | expe ct(@detail .status_de sc_element .text).to eq("View s tatus upda tes for th is request under the \"Request s\" sectio n of the H ome page. Once sched uled, the resulting appointmen t will be available in the VA Video Appo intment ap p.") | |
| 512 | end | |
| 513 | ||
| 514 | it "Ve rify Submi tted reque st details " do | |
| 515 | expe cted_detai ls = [\ | |
| 516 | "R equest Det ails", | |
| 517 | "S ubmitted: " + @@toda y + " @ " + time2 + " Locatio n: BOSTON HCS VAMC" + " Type o f Care: Ex press Care " + " Pref erence: Ca ll before booking ap pointment" + " Reaso n for Visi t: Ear Pro blem" + " Additional Informati on: Adding 2nd Expre ss Care Re quest", | |
| 518 | "Y our Contac t Informat ion", | |
| 519 | "P hone (703) 222-3333 Best Times for VA to Call Afte rnoon Morn ing" | |
| 520 | ||
| 521 | ] | |
| 522 | actu al_text = @detail.re quest_deta ils_group_ element.te xt.split(" \n") | |
| 523 | comp areContent s(expected _details, actual_tex t) | |
| 524 | ||
| 525 | ||
| 526 | end | |
| 527 | ||
| 528 | it "Ve rify Messa ge a clerk section" do | |
| 529 | expe cted_commu nicating_w ith_clerk= [\ | |
| 530 | "Message a Schedulin g Clerk", | |
| 531 | "You may s end up to two (2) me ssages whi le this re quest is i n Submitte d status. If you nee d addition al informa tion, plea se call yo ur local V A Medical Center" | |
| 532 | ] | |
| 533 | actu al_text = @detail.co mmunicate_ with_clerk _group_ele ment.text. split("\n" ) | |
| 534 | expe cted_commu nicating_w ith_clerk. each_with_ index do | expectedS creenRow, i | | |
| 535 | ex pect(actua l_text[i]) .to eq(exp ectedScree nRow) | |
| 536 | ||
| 537 | end | |
| 538 | end | |
| 539 | ||
| 540 | it "Ca ncel Reque st button present" d o | |
| 541 | expe ct(@detail .cancel_bt n_element. text).to e q("Cancel Request") | |
| 542 | end | |
| 543 | ||
| 544 | it "Ca ncel reque st confirm ation dial ogue detai ls" do | |
| 545 | ||
| 546 | @det ail.cancel _btn_eleme nt.click | |
| 547 | @mod al.modalTi tle_elemen t.when_pre sent(TIME_ OUT_LIMIT) | |
| 548 | expe ct(@modal. modalTitle ).to eq("C onfirmatio n") | |
| 549 | expe ct(@modal. content_el ement.text ).to eq("A re you sur e you want to cancel this requ est?\nSele ct Yes to cancel, No to return to the Re quest deta ils page." ) | |
| 550 | expe ct(@modal. buttons_el ements[0]. text).to e q("Yes") | |
| 551 | expe ct(@modal. buttons_el ements[1]. text).to e q("No") | |
| 552 | end | |
| 553 | ||
| 554 | it "Re turn back to details from Canc el" do | |
| 555 | @mod al.buttons _elements[ 1].click | |
| 556 | @det ail.reques t_details_ group_elem ent.when_p resent(TIM E_OUT_LIMI T) | |
| 557 | expe ct(@detail .has_expec ted_title? ).to eq(tr ue) | |
| 558 | end | |
| 559 | ||
| 560 | it "Succ essfully c ancel requ est" do | |
| 561 | @det ail.cancel _btn_eleme nt.click | |
| 562 | @mod al.modalTi tle_elemen t.when_pre sent(TIME_ OUT_LIMIT) | |
| 563 | @mod al.buttons _elements[ 0].click | |
| 564 | @det ail.status _element.w hen_visibl e(TIME_OUT _LIMIT) | |
| 565 | Wati r::Wait.un til {@deta il.status_ element.te xt == "Sta tus: Cance lled"} | |
| 566 | expe ct(@detail .status_el ement.text ).to eq("S tatus: Can celled") | |
| 567 | expe ct(@detail .status_de sc_element .text).to eq("You ha ve success fully canc elled this request." ) | |
| 568 | expe ct(@detail .status_la st_updated _element.t ext).to in clude("Upd ated: " + @@today) | |
| 569 | end | |
| 570 | ||
| 571 | it "re turn back to list fr om cancell ed request details p age" do | |
| 572 | ||
| 573 | butt on_element = @driver .button(:i d => 'back -btn') | |
| 574 | @dri ver.execut e_script(" $(argument s[0]).clic k();",butt on_element ) | |
| 575 | expe ct(@landin g_appointm ents.prima ry_header) .to eq("Ap pointments /Requests" ) | |
| 576 | end | |
| 577 | ||
| 578 | it "Ve rify Cance lled statu s in reque st list" d o | |
| 579 | requ est_detail s = @landi ng_appoint ments.requ est_table_ list_eleme nts[0] | |
| 580 | requ est_detail s.scroll.t o :top | |
| 581 | Wati r::Wait.un til {@land ing_appoin tments.req uest_table _list_elem ents.lengt h > 1} | |
| 582 | Wati r::Wait.un til {@land ing_appoin tments.get RequestTex tForRowCol (2,2) == " Submitted" } | |
| 583 | expe ct(@landin g_appointm ents.getRe questTextF orRowCol(1 ,2)).to eq ("Cancelle d") | |
| 584 | expe ct(@landin g_appointm ents.getRe questTextF orRowCol(2 ,2)).to eq ("Submitte d") | |
| 585 | end | |
| 586 | ||
| 587 | end | |
| 588 | end | |
| 589 | ||
| 590 | ||
| 591 | ||
| 592 | ||
| 593 | ||
| 594 | ||
| 595 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.