Produced by Araxis Merge on 12/7/2018 11:36:07 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\appointments | switch_clinics_and_schedule_appointment_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\appointments | switch_clinics_and_schedule_appointment_spec.rb | Fri Dec 7 13:25:48 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 346 |
| Changed | 2 | 4 |
| 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 | require 'r ubygems' | |
| 2 | require 'r spec' | |
| 3 | require 'w atir-webdr iver' | |
| 4 | require 'p age-object ' | |
| 5 | require 'o ci8' | |
| 6 | ||
| 7 | require_re lative '.. /../module /DriverUti lity' | |
| 8 | require_re lative '.. /rspec_hel per' | |
| 9 | require_re lative '.. /../pages/ landing' | |
| 10 | require_re lative '.. /../pages/ login' | |
| 11 | require_re lative '.. /../pages/ eula' | |
| 12 | require_re lative '.. /../common /common' | |
| 13 | require_re lative '.. /../pages/ landing_ap pointments ' | |
| 14 | require_re lative '.. /../common /cancel_ap pointment' | |
| 15 | require_re lative '.. /../pages/ appointmen ts/new_app ointment_r equest' | |
| 16 | require_re lative '.. /../pages/ appointmen ts/booked_ appointmen t_detail' | |
| 17 | require_re lative '.. /../helper /modal' | |
| 18 | require_re lative '.. /../module /database/ OracleUtil ity' | |
| 19 | require_re lative '.. /../module /DateUtili ty' | |
| 20 | require_re lative '.. /../helper /error_val idation' | |
| 21 | require_re lative '.. /../module /database/ MongoUtili ty' | |
| 22 | require_re lative '.. /../pages/ feedback' | |
| 23 | ||
| 24 | describe ' [STORY# VA R-9703: Di splay numb er of avai lable slot s after cl inic has b een select ed]' do | |
| 25 | ||
| 26 | include DriverUtil ity | |
| 27 | include OracleUtil ity | |
| 28 | include DateUtilit y | |
| 29 | include MongoUtili ty | |
| 30 | ||
| 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_a ppointment = NewAppo intmentReq uest.new(@ driver) | |
| 40 | @detai l = Booked Appointmen tDetail.ne w(@driver) | |
| 41 | @error = Error_V alidation. new(@drive r) | |
| 42 | @feedb ack = Feed back.new(@ driver) | |
| 43 | TITLE = "Appoint ments/Requ ests" | |
| 44 | ||
| 45 | @tomor row = getD ateNthDays FromNow(1, "%m/%d/%Y ") | |
| 46 | @ninty DaysLater = getDateN thDaysFrom Now(90, "% m/%d/%Y") | |
| 47 | @seven DaysFromNo w = getDat eNthDaysFr omNow(7, " %m/%d/%Y") | |
| 48 | ||
| 49 | #mongo | |
| 50 | @db = connectToM ongoDB("va r-utility" ) | |
| 51 | restor eCollectio n("siteSup portingVAR ", "var-ut ility", "s iteSupport ingMissing Location.j son", @db) | |
| 52 | restor eCollectio n("clinica l-services ", "var-ut ility", "c linical_se rvices_def ault.json" , @db) | |
| 53 | restor eCollectio n("directB ookingElig ibilityCri teria", "v ar-utility ", "primar yCareDirec tSchedulin gNewSettin gs.json", @db) | |
| 54 | restor eCollectio n("request Eligibilit yCriteria" , "var-uti lity", "re questEligi bilityCrit eria.json" , @db) | |
| 55 | restor eCollectio n("custom- friendly-t ext", "var -utility", "facility _friendly_ name.json" , @db) | |
| 56 | delete PatientDat a("1113138 327") | |
| 57 | @@time slot = "11 :00" | |
| 58 | @clini c_friendly _name ="JP PRIMARY C ARE DR. CR EAMER" | |
| 59 | @locat ion = "BOS TON HCS VA MC" | |
| 60 | ## The clinic na me is diff in cdw v/ s mdws but in real w orld its s ame per Ch ris. We ma y need to update thi s test onc e clinic n ame | |
| 61 | # for details, l ist and ap pointment form is be ing pulled from same place | |
| 62 | @clini c = "BOPAC TB1" | |
| 63 | @cancel_ap pointment = CancelAp pointment. new("CLINI C_BASED_BO STON", "52 3","#{ pw_reda c t e d ['userid'] }") | |
| 64 | @cance l_appointm ent.update _appointme nt_obj("ap pointmentT ime", "#{@ sevenDaysF romNow} 11 :00:00") | |
| 65 | @cance l_appointm ent.cancel _appointme nt() | |
| 66 | delete PatientDat a("1113138 327") | |
| 67 | @common.lo ginEndsOnH ome( pw_reda c t e d ) | |
| 68 | ||
| 69 | end | |
| 70 | ||
| 71 | after(:a ll) do | |
| 72 | @drive r.close | |
| 73 | end | |
| 74 | ||
| 75 | context '[AC#VAR-9 716|TC#VAR -9717: Dis play numbe r of avail able slots after cli nic has be en selecte d]' do | |
| 76 | it 'Na vigate to Create new appointme nt details section' do | |
| 77 | @com mon.select AddAppoint mentButton ("VA") | |
| 78 | @new _appointme nt.selectN ewAppointm entAndSche dule(PRIMA RY_CARE, " 523", "523 ", "direct ") | |
| 79 | @new _appointme nt.clinic_ radio_elem ents[1].wh en_present (TIME_OUT_ LIMIT) | |
| 80 | expe ct(@new_ap pointment. appointmen t_details_ legend).to eq("Appoi ntment Det ails") | |
| 81 | ||
| 82 | end | |
| 83 | ||
| 84 | it "sh ould sched ule an app ointment s uccessfull y once cli nic switch ed" do | |
| 85 | @new _appointme nt.selectN ewAppointm entAndSche dule(PRIMA RY_CARE, " 523", "523 ", "direct ") | |
| 86 | @new _appointme nt.selectC linic("444 ") | |
| 87 | @new _appointme nt.provide ReasonForA ppointment ("This is new Primar y Care Req uest") | |
| 88 | @new _appointme nt.enterEm ail("testP C@test.com ") | |
| 89 | @new _appointme nt.selectC linic("32" ) | |
| 90 | @new _appointme nt.reason_ element.wh en_present (TIME_OUT_ LIMIT) | |
| 91 | @new _appointme nt.provide ReasonForA ppointment ("This is new switch ed clinic" ) | |
| 92 | @new _appointme nt.selectP referedDat e(@sevenDa ysFromNow, @@timeslo t) | |
| 93 | @@se tDate = Ne wAppointme ntRequest. bookedDate | |
| 94 | @new _appointme nt.enterEm ail("testS C@test.com ") | |
| 95 | @new _appointme nt.clickSc heduleAppo intment | |
| 96 | @com mon.waitWh ileSpinner Present() | |
| 97 | Wati r::Wait.un til {@deta il.appoint ment_detai ls_group_e lement.pre sent?} | |
| 98 | Wati r::Wait.un til {@deta il.appoint ment_detai ls_group_e lement.tex t.include? ("Reason f or Appoint ment")} | |
| 99 | expe ct(@detail .appointme nt_status_ group_elem ent.text). to eq("Sta tus: Sche duled") | |
| 100 | end | |
| 101 | ||
| 102 | it "Sh ould verif y appointm ent detail s for date /time, cli nic and Re ason for A ppointment " do | |
| 103 | @sel ectedDay = getDayofW eek(@@setD ate) | |
| 104 | @@ti meslot = @ @timeslot. gsub!(':', '') | |
| 105 | expe cted_text = [\ | |
| 106 | "Date and Time:" + " #{@select edDay}," + " #{@@set Date}", | |
| 107 | "Date:" + " #{@selec tedDay},"+ " #{@@set Date}", | |
| 108 | @@timeslot , | |
| 109 | "Time: #{@ @timeslot. gsub("", " ")}", | |
| 110 | "Add to Ca lendar", | |
| 111 | "Details: " + "#{@lo cation}", | |
| 112 | "#{@clinic _friendly_ name}", | |
| 113 | "Also call ed: #{@cli nic}", | |
| 114 | "Please ar rive 30 mi nutes befo re your sc heduled ti me unless otherwise directed. VA Facilit y Locator" , | |
| 115 | "Cancel Ap pointment" , | |
| 116 | "Reason fo r Appointm ent: This is new swi tched clin ic" | |
| 117 | ] | |
| 118 | actu al_text = @detail.ap pointment_ details_gr oup_elemen t.text.spl it("\n") | |
| 119 | actu al_text = actual_tex t.reject { |c| c.emp ty? } | |
| 120 | expe cted_text. each_with_ index do | expectedS creenRow, i | | |
| 121 | ex pect(actua l_text[i]. gsub(/\s+/ , '')).to eq(expecte dScreenRow .gsub(/\s+ /, '')) | |
| 122 | end | |
| 123 | end | |
| 124 | ||
| 125 | it "Sh ould sched ule anther appointme nt with mu ltiple swi tches acro ss clinics " do | |
| 126 | @@ne wTimeSlot = "11:00" | |
| 127 | butt on_element = @driver .button(:i d => 'back -btn') | |
| 128 | @dri ver.execut e_script(" $(argument s[0]).clic k();",butt on_element ) | |
| 129 | @com mon.waitWh ileSpinner Present | |
| 130 | @lan ding_appoi ntments.ap pointment_ header_ele ment.wait_ until_pres ent(TIME_O UT_LIMIT) | |
| 131 | @can cel_appoin tment.canc el_appoint ment() | |
| 132 | @com mon.select AddAppoint mentButton ("VA") | |
| 133 | @new _appointme nt.selectN ewAppointm entAndSche dule(PRIMA RY_CARE, " 523", "523 ", "direct ") | |
| 134 | @new _appointme nt.selectC linic("32" ) | |
| 135 | @new _appointme nt.provide ReasonForA ppointment ("This is new Primar y Care Req uest") | |
| 136 | @new _appointme nt.enterEm ail("testP C@test.com ") | |
| 137 | @new _appointme nt.selectC linic("444 ") | |
| 138 | @new _appointme nt.reason_ element.wh en_present (TIME_OUT_ LIMIT) | |
| 139 | @new _appointme nt.selectC linic("32" ) | |
| 140 | @new _appointme nt.reason_ element.wh en_present (TIME_OUT_ LIMIT) | |
| 141 | @new _appointme nt.provide ReasonForA ppointment ("This is new switch ed clinic" ) | |
| 142 | @new _appointme nt.selectP referedDat e(@sevenDa ysFromNow, @@newTime Slot) | |
| 143 | @@se tNewDate = NewAppoin tmentReque st.bookedD ate | |
| 144 | @new _appointme nt.enterEm ail("testS C@test.com ") | |
| 145 | @new _appointme nt.clickSc heduleAppo intment | |
| 146 | @com mon.waitWh ileSpinner Present() | |
| 147 | Wati r::Wait.un til {@deta il.appoint ment_detai ls_group_e lement.pre sent?} | |
| 148 | Wati r::Wait.un til {@deta il.appoint ment_detai ls_group_e lement.tex t.include? ("Reason f or Appoint ment")} | |
| 149 | expe ct(@detail .appointme nt_status_ group_elem ent.text). to eq("Sta tus: Sche duled") | |
| 150 | end | |
| 151 | ||
| 152 | it "Sh ould verif y appointm ent detail s for date /time, mul ti clinic switch and Reason fo r Appointm ent" do | |
| 153 | @@ne wSelectedD ay = getDa yofWeek(@@ setNewDate ) | |
| 154 | @@ne wTimeSlot = @@newTim eSlot.gsub !(':', '') | |
| 155 | expe cted_text = [\ | |
| 156 | "Date and Time:" + " #{@@newSe lectedDay} ," + " #{@ @setNewDat e}", | |
| 157 | "Date:" + " #{@@newS electedDay },"+ " #{@ @setNewDat e}", | |
| 158 | @@newTimeS lot, | |
| 159 | "Time: #{@ @newTimeSl ot.gsub("" , " ")}", | |
| 160 | "Add to Ca lendar", | |
| 161 | "Details: " + "#{@lo cation}", | |
| 162 | "#{@clinic _friendly_ name}", | |
| 163 | "Also call ed: #{@cli nic}", | |
| 164 | "Please ar rive 30 mi nutes befo re your sc heduled ti me unless otherwise directed. VA Facilit y Locator" , | |
| 165 | "Cancel Ap pointment" , | |
| 166 | "Reason fo r Appointm ent: This is new swi tched clin ic" | |
| 167 | ] | |
| 168 | actu al_text = @detail.ap pointment_ details_gr oup_elemen t.text.spl it("\n") | |
| 169 | actu al_text = actual_tex t.reject { |c| c.emp ty? } | |
| 170 | expe cted_text. each_with_ index do | expectedS creenRow, i | | |
| 171 | ex pect(actua l_text[i]. gsub(/\s+/ , '')).to eq(expecte dScreenRow .gsub(/\s+ /, '')) | |
| 172 | end | |
| 173 | end | |
| 174 | end | |
| 175 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.