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__mh_request_and_details_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__mh_request_and_details_spec.rb | Fri Dec 7 13:25:58 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 392 |
| 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 | ||
| 9 | require_re lative '.. /../module /DriverUti lity' | |
| 10 | require_re lative '.. /rspec_hel per' | |
| 11 | require_re lative 're quest_help er' | |
| 12 | require_re lative '.. /../pages/ landing' | |
| 13 | require_re lative '.. /../pages/ login' | |
| 14 | require_re lative '.. /../pages/ eula' | |
| 15 | require_re lative '.. /../common /common' | |
| 16 | require_re lative '.. /../pages/ landing_ap pointments ' | |
| 17 | require_re lative '.. /../pages/ appointmen ts/new_app ointment_r equest' | |
| 18 | require_re lative '.. /../pages/ appointmen ts/request _appointme nt_detail' | |
| 19 | require_re lative '.. /../helper /modal' | |
| 20 | require_re lative '.. /../module /database/ OracleUtil ity' | |
| 21 | require_re lative '.. /../module /DateUtili ty' | |
| 22 | require_re lative '.. /../helper /error_val idation' | |
| 23 | require_re lative '.. /../module /database/ MongoUtili ty' | |
| 24 | ||
| 25 | ||
| 26 | describe ' [Story #VA R-1945: Ne w Request - Submissi on/Cancel Entry]' do | |
| 27 | include OracleUtil ity | |
| 28 | include DateUtilit y | |
| 29 | include DriverUtil ity | |
| 30 | include MongoUtili ty | |
| 31 | ||
| 32 | before(: all) do | |
| 33 | initia lizeConfig urations(V AR_BASE_UR L) | |
| 34 | @landi ng_appoint ments = La ndingAppoi ntments.ne w(@driver) | |
| 35 | @login = Login.n ew(@driver ) | |
| 36 | @eula = Eula.new (@driver) | |
| 37 | @commo n = Common .new(@driv er) | |
| 38 | @modal = Modal.n ew(@driver ) | |
| 39 | @new_r equest = N ewAppointm entRequest .new(@driv er) | |
| 40 | @detai l = Reques tAppointme ntDetail.n ew(@driver ) | |
| 41 | @error = Error_V alidation. new(@drive r) | |
| 42 | TITLE = "Appoint ments/Requ ests" | |
| 43 | ||
| 44 | #mongo | |
| 45 | @db = connectToM ongoDB("va r-utility" ) | |
| 46 | restor eCollectio n("siteSup portingVAR ", "var-ut ility", "s ites-suppo rting-var- exported2. json", @db ) | |
| 47 | restor eCollectio n("clinica l-services ", "var-ut ility", "c linical_se rvices_def ault.json" , @db) | |
| 48 | restor eCollectio n("custom- friendly-t ext", "var -utility", "facility _friendly_ name.json" , @db) | |
| 49 | restor eCollectio n("request Eligibilit yCriteria" , "var-uti lity", "re questEligi bilityCrit eria.json" , @db) | |
| 50 | restor eCollectio n("directB ookingElig ibilityCri teria", "v ar-utility ", "direct Scheduling Enabled.js on", @db) | |
| 51 | ||
| 52 | @today = getDate NthDaysFro mNow(0, "% m/%d/%Y") | |
| 53 | ||
| 54 | @fiveD aysLater = getDateNt hDaysFromN ow(5, "%m/ %d/%Y") | |
| 55 | @ninty DaysLater = getDateN thDaysFrom Now(90, "% m/%d/%Y") | |
| 56 | ||
| 57 | #this will not w ork in CI but the da ta will be reset in the jenkin s | |
| 58 | @patie ntID = "10 06088937V0 99668" | |
| 59 | @patie ntID2 = "1 113138327" | |
| 60 | delete PatientDat a(@patient ID) | |
| 61 | delete PatientDat a(@patient ID2) | |
| 62 | @@loca tionID="52 3A5" | |
| 63 | @@loca tionName=" BROCKTON V AMC" | |
| 64 | @@type OfCare = M ENTAL_HEAL TH | |
| 65 | @@frie ndlyName = "Facility Friendly T ext" | |
| 66 | @@faci lityName = "BOSTON H CS VAMC" | |
| 67 | @@new_ message_50 = "012345 6789012345 6789012345 6789012345 6789012345 6789" | |
| 68 | @common.lo ginEndsOnH ome( pw_reda c t e d ) | |
| 69 | end | |
| 70 | ||
| 71 | after(:a ll) do | |
| 72 | @drive r.close | |
| 73 | end | |
| 74 | ||
| 75 | context "AC#VAR-24 80|TC#VAR- 2517: New Request - Submission Confirmat ion Criter ia" do | |
| 76 | ||
| 77 | it "Ad d a mental health re quest and verify det ails" do | |
| 78 | sche dulingMeth od = "cler k" | |
| 79 | faci lityId = " 523" | |
| 80 | ||
| 81 | type OfVisit = "Office Vi sit" | |
| 82 | purp oseOfVisit = "New Is sue" | |
| 83 | othe rPurposeOf Visit = "" | |
| 84 | desi redDateTim e1 = [getD ateNthDays FromNow(30 , "%m/%d/% Y"), "AM"] | |
| 85 | desi redDateTim e2 = [getD ateNthDays FromNow(32 , "%m/%d/% Y"), "PM"] | |
| 86 | desi redDAteTim e3 = [getD ateNthDays FromNow(33 , "%m/%d/% Y"), "AM"] | |
| 87 | phon eNum = "(2 34) 567-89 01" | |
| 88 | veri fyPhoneNum = "(234) 567-8901" | |
| 89 | ||
| 90 | best TimeToCall = " Eveni ng" | |
| 91 | call _morning = false | |
| 92 | call _afternoon = false | |
| 93 | call _evening = true | |
| 94 | best TimesForVA toCall = [ call_morni ng, call_a fternoon, call_eveni ng] | |
| 95 | vaTo CallYou = false | |
| 96 | mess age = "Req uesting Me ntal Healt h Appointm ent" | |
| 97 | send MeEmail = "false" | |
| 98 | emai l = "test1 @hotmail.c om" | |
| 99 | addR equest(sch edulingMet hod, @@typ eOfCare, f acilityId, typeOfVis it, purpos eOfVisit, otherPurpo seOfVisit, desiredDa teTime1, d esiredDate Time2, des iredDAteTi me3, phone Num, verif yPhoneNum, bestTimes ForVAtoCal l, vaToCal lYou, mess age, sendM eEmail, em ail ) | |
| 100 | ||
| 101 | expe cted_detai ls = [\ | |
| 102 | "R equest Det ails", | |
| 103 | "S ubmitted: " + @today + " @ HH: MM" + " Lo cation: " + @@facili tyName + " Type of C are: " + @ @typeOfCar e + " Pref erred Type of Visit: " + typeO fVisit, | |
| 104 | "P urpose of Visit: " + purposeOf Visit, | |
| 105 | "P referred A ppointment Date/Time ", | |
| 106 | "1 st Choice: " + desir edDateTime 1[0] + " " + desired DateTime1[ 1] + " 2nd Choice: " + desired DateTime2[ 0] + " " + desiredDa teTime2[1] + " 3rd C hoice: " + desiredDA teTime3[0] + " " + d esiredDAte Time3[1] | |
| 107 | ] | |
| 108 | expe cted_commu nicating_w ith_clerk= [\ | |
| 109 | "Message a Scheduli ng Clerk", | |
| 110 | "You may send up to two (2) m essages wh ile this r equest is in Submitt ed status. If you ne ed additio nal inform ation, ple ase call y our local VA Medical Center" | |
| 111 | ||
| 112 | ] | |
| 113 | veri fyRequestD etails(exp ected_deta ils, expec ted_commun icating_wi th_clerk, @@facility Name) | |
| 114 | ||
| 115 | end | |
| 116 | ||
| 117 | ||
| 118 | it "Ve rify Reque st in list " do | |
| 119 | veri fyTableLis t(@@facili tyName, @t oday, @@ty peOfCare) | |
| 120 | end | |
| 121 | #add 2nd Menta l Health R equest | |
| 122 | ||
| 123 | it "ad d a second mental he alth reque st" do | |
| 124 | #add clerk Men tal Health | |
| 125 | sche dulingMeth od = "cler k" | |
| 126 | ||
| 127 | faci lityId = " 523" | |
| 128 | type OfVisit = "Phone Cal l" | |
| 129 | purp oseOfVisit = "New Is sue" | |
| 130 | othe rPurposeOf Visit = "" | |
| 131 | desi redDateTim e1 = [getD ateNthDays FromNow(88 , "%m/%d/% Y"), "PM"] | |
| 132 | desi redDateTim e2 = [getD ateNthDays FromNow(89 , "%m/%d/% Y"), "PM"] | |
| 133 | desi redDAteTim e3 = [getD ateNthDays FromNow(90 , "%m/%d/% Y"), "AM"] | |
| 134 | phon eNum = "(5 71) 234-89 01" | |
| 135 | veri fyPhoneNum = "(571) 234- 8901" | |
| 136 | ||
| 137 | best TimeToCall = "Evenin g" | |
| 138 | call _morning = false | |
| 139 | call _afternoon = false | |
| 140 | call _evening = true | |
| 141 | ||
| 142 | best TimesForVA toCall = [ call_morni ng, call_a fternoon, call_eveni ng] | |
| 143 | vaTo CallYou = false | |
| 144 | mess age = "" | |
| 145 | send MeEmail = "true" | |
| 146 | emai l = "test2 @hotmail.c om" | |
| 147 | @lan ding_appoi ntments.pr imary_head er_element .when_pres ent(TIME_O UT_LIMIT) | |
| 148 | wait TillReques tsDisplay | |
| 149 | addR equest(sch edulingMet hod, @@typ eOfCare, f acilityId, typeOfVis it, purpos eOfVisit, otherPurpo seOfVisit, desiredDa teTime1, d esiredDate Time2, des iredDAteTi me3, phone Num, verif yPhoneNum, bestTimes ForVAtoCal l, vaToCal lYou, mess age, sendM eEmail, em ail ) | |
| 150 | ||
| 151 | expe cted_detai ls = [\ | |
| 152 | "R equest Det ails", | |
| 153 | "S ubmitted: " + @today + " @ HH: MM" + " L ocation: " + @@facil ityName + " Type of Care: " + @@typeOfCa re + " Pre ferred Typ e of Visit : " + type OfVisit, | |
| 154 | "P urpose of Visit: " + purposeOf Visit, | |
| 155 | "P referred A ppointment Date/Time ", | |
| 156 | "1 st Choice: " + desir edDateTime 1[0] + " " + desired DateTime1[ 1] + " 2nd Choice: " + desired DateTime2[ 0] + " " + desiredDa teTime2[1] + " 3rd C hoice: " + desiredDA teTime3[0] + " " + d esiredDAte Time3[1] | |
| 157 | ] | |
| 158 | ||
| 159 | expe cted_commu nicating_w ith_clerk= [\ | |
| 160 | "Message a Schedulin g Clerk", | |
| 161 | "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" | |
| 162 | ] | |
| 163 | ||
| 164 | veri fyRequestD etails(exp ected_deta ils, expec ted_commun icating_wi th_clerk, @@facility Name) | |
| 165 | end | |
| 166 | ||
| 167 | it "ve rify reque st in list " do | |
| 168 | veri fyTableLis t(@@facili tyName, @t oday, @@ty peOfCare) | |
| 169 | end | |
| 170 | ||
| 171 | it "Ve rify reque st limit i s reached message" d o | |
| 172 | @com mon.select AddAppoint mentButton ("VA") | |
| 173 | @new _request.s electTypeO fCare(MENT AL_HEALTH) | |
| 174 | @new _request.s electState ("523") | |
| 175 | @new _request.s electLocat ion("523") | |
| 176 | ||
| 177 | expe cted_conte nt =[\ | |
| 178 | "Step 4: Schedul ing Method ", | |
| 179 | "The l ocation yo u selected supports the follow ing schedu ling metho ds:", | |
| 180 | "* Sel ect a sche duling met hod:", | |
| 181 | "Sched ule Myself ", | |
| 182 | "Submi t a Reques t to VA Sc heduler", | |
| 183 | "You h ave reache d the limi t of 2 #{M ENTAL_HEAL TH} reques t(s).", | |
| 184 | "In or der to pro ceed, plea se cancel a pending request, o r wait for the VA to process a request." | |
| 185 | ] | |
| 186 | ||
| 187 | actu al_content = @new_re quest.sche duling_met hod_sectio n.split("\ n") | |
| 188 | comp areContent s(expected _content, actual_con tent) | |
| 189 | ||
| 190 | end | |
| 191 | end | |
| 192 | end | |
| 193 | ||
| 194 | ||
| 195 | ||
| 196 | ||
| 197 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.