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 | verify_facility_friendly_name_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 | verify_facility_friendly_name_request_spec.rb | Fri Dec 7 13:26:02 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 316 |
| 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 # V AR-7833: S ubmit Requ est - Save to reques t db] | |
| 27 | [Story# VA R-10204: S ave 5-digi t location informati on when su bmitting a n appointm ent reques t]' 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_brock ton.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 B rockton" | |
| 66 | @@best TimeToCall = "Aftern oon Evenin g" | |
| 67 | @desir edDateTime 1 = [getDa teNthDaysF romNow(40, "%m/%d/%Y "), "AM"] | |
| 68 | @desir edDateTime 2 = [getDa teNthDaysF romNow(42, "%m/%d/%Y "), "PM"] | |
| 69 | @desir edDAteTime 3 = [getDa teNthDaysF romNow(43, "%m/%d/%Y "), "AM"] | |
| 70 | @@new_ message_50 = "012345 6789012345 6789012345 6789012345 6789012345 6789" | |
| 71 | @common.lo ginEndsOnH ome( pw_reda c t e d ) | |
| 72 | end | |
| 73 | ||
| 74 | after(:a ll) do | |
| 75 | restor eCollectio n("custom- friendly-t ext", "var -utility", "facility _friendly_ name.json" , @db) | |
| 76 | @drive r.close | |
| 77 | end | |
| 78 | ||
| 79 | context '[AC#: VAR -10196| TC #VAR-10197 : Submit R equest - S ave to req uest db] | |
| 80 | [AC#VAR-1 0282| TC#V AR-10283: Save 5-dig it locatio n informat ion when s ubmitting an appoint ment reque st]' do | |
| 81 | ||
| 82 | it "Ve rify frien dly name s aved to db for new r equest" do | |
| 83 | ||
| 84 | type OfCare = M ENTAL_HEAL TH | |
| 85 | sche dulingMeth od = "cler k" | |
| 86 | type OfVisit = "Office Vi sit" | |
| 87 | purp oseOfVisit = "Medica tion Conce rn" | |
| 88 | othe rPurposeOf Visit = "" | |
| 89 | phon eNum = "(2 34) 567-89 01" | |
| 90 | veri fyPhoneNum = "(234) 567-8901" | |
| 91 | call _morning = false | |
| 92 | call _afternoon = true | |
| 93 | call _evening = true | |
| 94 | best TimesForVA toCall = [ call_morni ng, call_a fternoon, call_eveni ng] | |
| 95 | vaTo CallYou = true | |
| 96 | mess age = "" | |
| 97 | send MeEmail = "false" | |
| 98 | emai l = "test1 @hotmail.c om" | |
| 99 | ||
| 100 | addR equest(sch edulingMet hod, typeO fCare, @@l ocationID, typeOfVis it, purpos eOfVisit, otherPurpo seOfVisit, @desiredD ateTime1, @desiredDa teTime2, @ desiredDAt eTime3, ph oneNum, ve rifyPhoneN um, bestTi mesForVAto Call, vaTo CallYou, m essage, se ndMeEmail, email) | |
| 101 | "Pre ference: C all before booking a ppointment " + " Purp ose of Vis it: " + pu rposeOfVis it | |
| 102 | ||
| 103 | @com mon.waitWh ileSpinner Present | |
| 104 | ||
| 105 | @det ail.status _element.w hen_presen t(TIME_OUT _LIMIT) | |
| 106 | expe ct(@detail .has_expec ted_title? ).to eq(tr ue) | |
| 107 | ||
| 108 | expe ct(@detail .status_el ement.text ).to eq("S tatus: Sub mitted") | |
| 109 | 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 A ppointment s and Requ ests page. Once sche duled, the resulting appointme nt will be displayed under the “Appoin tments†section of the same page.") | |
| 110 | ||
| 111 | end | |
| 112 | ||
| 113 | it "Ve rify submi tted reque st details " do | |
| 114 | ||
| 115 | EXPE CTED_TEXT = [\ | |
| 116 | "R equest Det ails", | |
| 117 | "S ubmitted: " + @today + " @HH:M M" " Loc ation: #{@ @friendlyN ame} Type of Care: " + MENTAL_ HEALTH + " Preferre d Type of Visit: " + "Office V isit", | |
| 118 | "P urpose of Visit: Med ication Co ncern", | |
| 119 | "P referred A ppointment Date/Time ", | |
| 120 | "1 st Choice: " + @desi redDateTim e1[0] + " " + @desir edDateTime 1[1] + " 2 nd Choice: " + @desi redDateTim e2[0] + " " + @desir edDateTime 2[1] + " 3 rd Choice: " + @desi redDAteTim e3[0] + " " + @desir edDAteTime 3[1], | |
| 121 | "Y our Contac t Informat ion", | |
| 122 | "P hone (234) 567-8901 Best Times for VA to Call #{@@ bestTimeTo Call}" | |
| 123 | ] | |
| 124 | ||
| 125 | actu al_text = @detail.re quest_deta ils_group_ element.te xt.split(" \n") | |
| 126 | EXPE CTED_TEXT. each_with_ index do | expectedS creenRow, i | | |
| 127 | if (expected ScreenRow. include?(" Submitted: ")) | |
| 128 | expect(act ual_text[i ]).to incl ude("Submi tted: " + @today) | |
| 129 | expect(act ual_text[i ]).to incl ude("Locat ion: #{@@f riendlyNam e}") | |
| 130 | el se | |
| 131 | expect(act ual_text[i ]).to eq(e xpectedScr eenRow) | |
| 132 | en d | |
| 133 | end | |
| 134 | ||
| 135 | end | |
| 136 | ||
| 137 | it "ve rify frien dly name i s saved in oracle" d o | |
| 138 | slee p 2 | |
| 139 | faci lityData = executeAn dGetDataAn dNumRow("S ELECT FACI LITY_CODE, FRIENDLY_ NAME FROM VARDB.APPO INTMENT_RE QUEST WHER E PATIENT_ ID = '1113 138327' an d STATUS = 'Submitted '") | |
| 140 | faci lityArr = facilityDa ta.split(" ||") | |
| 141 | faci lityArr = facilityAr r[0].split (",") | |
| 142 | puts "Data is: ", facili tyArr[0] | |
| 143 | expe ct(facilit yArr[0]).t o eq(@@loc ationID) | |
| 144 | expe ct(facilit yArr[1]).t o eq(@@fri endlyName) | |
| 145 | ||
| 146 | end | |
| 147 | ||
| 148 | it "Ve rify Frien dly name i s displaye d in reque st list" d o | |
| 149 | butt on_element = @driver .button(:i d => 'back -btn') | |
| 150 | @dri ver.execut e_script(" $(argument s[0]).clic k();",butt on_element ) | |
| 151 | @com mon.waitWh ileSpinner Present | |
| 152 | requ est_detail s = @landi ng_appoint ments.requ est_table_ list_eleme nts[0] | |
| 153 | requ est_detail s.scroll.t o :top | |
| 154 | wait TillReques tsDisplay | |
| 155 | expe ct(@landin g_appointm ents.getRe questTextF orRowCol(1 ,3)).to eq ("#{@@frie ndlyName}" ) | |
| 156 | end | |
| 157 | end | |
| 158 | ||
| 159 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.