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 | cancel_an_existing_request_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 | cancel_an_existing_request_spec.rb | Fri Dec 7 13:26:00 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 368 |
| 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 | ||
| 10 | require_re lative '.. /../module /DriverUti lity' | |
| 11 | require_re lative '.. /rspec_hel per' | |
| 12 | require_re lative 're quest_help er' | |
| 13 | require_re lative '.. /../pages/ landing' | |
| 14 | require_re lative '.. /../pages/ login' | |
| 15 | require_re lative '.. /../pages/ eula' | |
| 16 | require_re lative '.. /../common /common' | |
| 17 | require_re lative '.. /../pages/ landing_ap pointments ' | |
| 18 | require_re lative '.. /../pages/ appointmen ts/new_app ointment_r equest' | |
| 19 | require_re lative '.. /../pages/ appointmen ts/request _appointme nt_detail' | |
| 20 | require_re lative '.. /../helper /modal' | |
| 21 | require_re lative '.. /../module /database/ OracleUtil ity' | |
| 22 | require_re lative '.. /../module /DateUtili ty' | |
| 23 | require_re lative '.. /../helper /error_val idation' | |
| 24 | require_re lative '.. /../module /database/ MongoUtili ty' | |
| 25 | ||
| 26 | ||
| 27 | describe ' [Story #VA R-1919: Ap pointment Request - Cancel Req uest]' do | |
| 28 | include OracleUtil ity | |
| 29 | include DateUtilit y | |
| 30 | include DriverUtil ity | |
| 31 | include MongoUtili ty | |
| 32 | ||
| 33 | before(: all) do | |
| 34 | initia lizeConfig urations(V AR_BASE_UR L) | |
| 35 | @landi ng_appoint ments = La ndingAppoi ntments.ne w(@driver) | |
| 36 | @login = Login.n ew(@driver ) | |
| 37 | @eula = Eula.new (@driver) | |
| 38 | @commo n = Common .new(@driv er) | |
| 39 | @modal = Modal.n ew(@driver ) | |
| 40 | @new_r equest = N ewAppointm entRequest .new(@driv er) | |
| 41 | @detai l = Reques tAppointme ntDetail.n ew(@driver ) | |
| 42 | @error = Error_V alidation. new(@drive r) | |
| 43 | TITLE = "Appoint ments/Requ ests" | |
| 44 | ||
| 45 | #mongo | |
| 46 | @db = connectToM ongoDB("va r-utility" ) | |
| 47 | restor eCollectio n("siteSup portingVAR ", "var-ut ility", "s ites-suppo rting-var- exported2. json", @db ) | |
| 48 | restor eCollectio n("clinica l-services ", "var-ut ility", "c linical_se rvices_def ault.json" , @db) | |
| 49 | restor eCollectio n("custom- friendly-t ext", "var -utility", "facility _friendly_ name.json" , @db) | |
| 50 | restor eCollectio n("request Eligibilit yCriteria" , "var-uti lity", "re questEligi bilityCrit eria.json" , @db) | |
| 51 | restor eCollectio n("directB ookingElig ibilityCri teria", "v ar-utility ", "direct Scheduling Enabled.js on", @db) | |
| 52 | ||
| 53 | @today = getDate NthDaysFro mNow(0, "% m/%d/%Y") | |
| 54 | ||
| 55 | @fiveD aysLater = getDateNt hDaysFromN ow(5, "%m/ %d/%Y") | |
| 56 | @ninty DaysLater = getDateN thDaysFrom Now(90, "% m/%d/%Y") | |
| 57 | ||
| 58 | #this will not w ork in CI but the da ta will be reset in the jenkin s | |
| 59 | @patie ntID = "10 06088937V0 99668" | |
| 60 | @patie ntID2 = "1 113138327" | |
| 61 | delete PatientDat a(@patient ID) | |
| 62 | delete PatientDat a(@patient ID2) | |
| 63 | @@loca tionID="52 3A5" | |
| 64 | @@loca tionName=" BROCKTON V AMC" | |
| 65 | @@frie ndlyName = "Facility Friendly T ext" | |
| 66 | @@new_ message_50 = "012345 6789012345 6789012345 6789012345 6789012345 6789" | |
| 67 | @common.lo ginEndsOnH ome( pw_reda c t e d ) | |
| 68 | @landi ng_appoint ments.prim ary_header _element.w hen_presen t(TIME_OUT _LIMIT) | |
| 69 | ||
| 70 | end | |
| 71 | ||
| 72 | after(:a ll) do | |
| 73 | @drive r.close | |
| 74 | end | |
| 75 | ||
| 76 | context 'AC# VAR-2 047|TC# VA R-2225: Ap pointment Request - Cancel Req uest Crite ria' do | |
| 77 | it "sh ould creat e a reques t" do | |
| 78 | @com mon.select AddAppoint mentButton ("VA") | |
| 79 | @new _request.s electNewAp pointmentA ndSchedule (EXPRESS_C ARE, "523" , "523", " clerk") | |
| 80 | @new _request.a ddExpressC are | |
| 81 | @com mon.waitWh ileSpinner Present | |
| 82 | @det ail.status _element.w hen_presen t(TIME_OUT _LIMIT) | |
| 83 | expe ct(@detail .has_expec ted_title? ).to eq(tr ue) | |
| 84 | expe ct(@detail .status_el ement.text ).to eq("S tatus: Sub mitted") | |
| 85 | end | |
| 86 | ||
| 87 | it "Re quests Tab le Validat ion" do | |
| 88 | butt on_element = @driver .button(:i d => 'back -btn') | |
| 89 | @dri ver.execut e_script(" $(argument s[0]).clic k();",butt on_element ) | |
| 90 | ||
| 91 | @lan ding_appoi ntments.pr imary_head er_element .when_pres ent(TIME_O UT_LIMIT) | |
| 92 | requ est_detail s = @landi ng_appoint ments.requ est_table_ list_eleme nts[0] | |
| 93 | requ est_detail s.scroll.t o :top | |
| 94 | Wati r::Wait.un til {@land ing_appoin tments.req uest_table _list_elem ents.lengt h > 0} | |
| 95 | ||
| 96 | #Col umn 1 Labe l: Last Up dated | |
| 97 | expe ct(@landin g_appointm ents.getNt hRequestTa bleHeader( 1)).to eq( "Last Upda ted") | |
| 98 | #Col umn Label: Status | |
| 99 | expe ct(@landin g_appointm ents.getNt hRequestTa bleHeader( 2)).to eq( "Status") | |
| 100 | #Col umn Label: Location; | |
| 101 | expe ct(@landin g_appointm ents.getNt hRequestTa bleHeader( 3)).to eq( "Location" ) | |
| 102 | #Col umn Label: /Type of Care; | |
| 103 | expe ct(@landin g_appointm ents.getNt hRequestTa bleHeader( 4)).to eq( "Type of C are") | |
| 104 | end | |
| 105 | ||
| 106 | ||
| 107 | it "Wh en a user views a re quest that is in Sub mitted sta tus, a Can cel Reques t option i s availabl e in the R equest Det ails secti on of the Request pa ge" do | |
| 108 | Wati r::Wait.un til {@land ing_appoin tments.req uest_table _list_elem ents[0].pr esent?} | |
| 109 | @lan ding_appoi ntments.re quest_tabl e_list_ele ments[0].c lick | |
| 110 | @com mon.waitWh ileSpinner Present | |
| 111 | ||
| 112 | @det ail.reques t_details_ group_elem ent.when_p resent(TIM E_OUT_LIMI T) | |
| 113 | expe ct(@detail .has_expec ted_title? ).to eq(tr ue) | |
| 114 | ||
| 115 | expe ct(@detail .cancel_bt n_element. exists?).t o eq(true) | |
| 116 | expe ct(@detail .cancel_bt n_element. text).to e q("Cancel Request") | |
| 117 | end | |
| 118 | ||
| 119 | it "Wh en the Can cel Reques t button i s selected a confirm ation moda l is shown " do | |
| 120 | @det ail.cancel _btn_eleme nt.click | |
| 121 | @mod al.modalTi tle_elemen t.when_pre sent(TIME_ OUT_LIMIT) | |
| 122 | expe ct(@modal. modalTitle ).to eq('C onfirmatio n') | |
| 123 | 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." ) | |
| 124 | expe ct(@modal. buttons_el ements[0]. text).to e q("Yes") | |
| 125 | expe ct(@modal. buttons_el ements[1]. text).to e q("No") | |
| 126 | end | |
| 127 | it "No button, s electing c loses the modal, mai ntains the Submitted status fo r the requ est, " do | |
| 128 | @mod al.buttons _elements[ 1].click | |
| 129 | @det ail.reques t_details_ group_elem ent.when_p resent(TIM E_OUT_LIMI T) | |
| 130 | expe ct(@detail .has_expec ted_title? ).to eq(tr ue) | |
| 131 | end | |
| 132 | it "Sh ould verif y Yes butt on exists for cancel " do | |
| 133 | @det ail.cancel _btn_eleme nt.click | |
| 134 | @mod al.modalTi tle_elemen t.when_pre sent(TIME_ OUT_LIMIT) | |
| 135 | expe ct(@modal. modalTitle ).to eq('C onfirmatio n') | |
| 136 | expe ct(@modal. buttons_el ements[0]. text).to e q("Yes") | |
| 137 | end | |
| 138 | ||
| 139 | it "Se lecting Ye s should c ancel the request" d o | |
| 140 | @mod al.buttons _elements[ 0].click | |
| 141 | ||
| 142 | @det ail.status _element.w hen_visibl e(TIME_OUT _LIMIT) | |
| 143 | Wati r::Wait.un til {@deta il.status_ element.te xt == "Sta tus: Cance lled"} | |
| 144 | expe ct(@detail .status_el ement.text ).to eq("S tatus: Can celled") | |
| 145 | expe ct(@detail .status_de sc_element .text).to eq("You ha ve success fully canc elled this request." ) | |
| 146 | expe ct(@detail .status_la st_updated _element.t ext).to in clude("Upd ated: " + @today) | |
| 147 | end | |
| 148 | ||
| 149 | ||
| 150 | it "Sh ould verif y request cancelled in list" d o | |
| 151 | butt on_element = @driver .button(:i d => 'back -btn') | |
| 152 | @dri ver.execut e_script(" $(argument s[0]).clic k();",butt on_element ) | |
| 153 | expe ct(@landin g_appointm ents.prima ry_header) .to eq("Ap pointments /Requests" ) | |
| 154 | end | |
| 155 | end | |
| 156 | ||
| 157 | context "AC# VAR-2 044|TC# VA R-2226: Ap pointment Request - Status Bar " do | |
| 158 | it "Ti tle: Statu s" do | |
| 159 | ||
| 160 | @lan ding_appoi ntments.re fresh_elem ent.when_p resent(TIM E_OUT_LIMI T) | |
| 161 | @lan ding_appoi ntments.re fresh | |
| 162 | @com mon.waitWh ileSpinner Present | |
| 163 | expe ct(@landin g_appointm ents.getRe questTextF orRowCol(1 ,2)).to eq ("Cancelle d") | |
| 164 | end | |
| 165 | ||
| 166 | it "ve rify detai ls of canc eled reque st" do | |
| 167 | @lan ding_appoi ntments.re quest_tabl e_list_ele ments[0].c lick | |
| 168 | @det ail.status _element.w hen_presen t(TIME_OUT _LIMIT) | |
| 169 | expe ct(@detail .has_expec ted_title? ).to eq(tr ue) | |
| 170 | ||
| 171 | expe ct(@detail .status_el ement.text ).to eq("S tatus: Can celled") | |
| 172 | expe ct(@detail .status_la st_updated _element.t ext).to in clude("Upd ated: " + @today) | |
| 173 | ||
| 174 | expe ct(@detail .status_de sc_element .text).to eq("You ha ve success fully canc elled this request." ) | |
| 175 | ||
| 176 | end | |
| 177 | ||
| 178 | end | |
| 179 | ||
| 180 | end | |
| 181 | ||
| 182 | ||
| 183 | ||
| 184 | ||
| 185 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.