263. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/7/2018 11:36:06 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.

263.1 Files compared

# 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 cancel_booked_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 cancel_booked_appointment_spec.rb Fri Dec 7 13:25:48 2018 UTC

263.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 348
Changed 2 4
Inserted 0 0
Removed 0 0

263.3 Comparison options

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

263.4 Active regular expressions

No regular expressions were active.

263.5 Comparison detail

  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  
  8   require_re lative '.. /../module /DriverUti lity'
  9   require_re lative '.. /rspec_hel per'
  10   require_re lative '.. /../pages/ landing'
  11   require_re lative '.. /../pages/ login'
  12   require_re lative '.. /../pages/ eula'
  13   require_re lative '.. /../common /common'
  14   require_re lative '.. /../pages/ landing_ap pointments '
  15   require_re lative '.. /../common /cancel_ap pointment'
  16   require_re lative '.. /../pages/ appointmen ts/booked_ appointmen t_detail'
  17   require_re lative '.. /../pages/ appointmen ts/new_app ointment_r equest'
  18   require_re lative '.. /../helper /modal'
  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 '.. /../module /database/ OracleUtil ity'
  23  
  24   describe ' [Story# VA R-1923: Bo oked Appoi ntment - C ancel Appo intment]
  25              [Story# VA R-3061: Di rect Appoi ntment - A dd Reason  for Cancel lation]' d o
  26     include  DriverUtil ity
  27     include  OracleUtil ity
  28     include  DateUtilit y
  29     include  MongoUtili ty
  30  
  31     before(: all) do
  32       initia lizeConfig urations(V AR_BASE_UR L)
  33       @landi ng_appoint ments = La ndingAppoi ntments.ne w(@driver)
  34       @login  = Login.n ew(@driver )
  35       @eula  = Eula.new (@driver)
  36       @commo n = Common .new(@driv er)
  37       @modal  = Modal.n ew(@driver )
  38       @detai l = Booked Appointmen tDetail.ne w(@driver)
  39       @error  = Error_V alidation. new(@drive r)
  40       @new_a ppointment  = NewAppo intmentReq uest.new(@ driver)
  41       @db =  connectToM ongoDB("va r-utility" )
  42  
  43       @tomor row = getD ateNthDays FromNow(1,  "%m/%d/%Y  @ 09:00")
  44       @twoDa ysLater =  getDateNth DaysFromNo w(2, "%m/% d/%Y @ 09: 00")
  45       @thirt yDaysLater  = getDate NthDaysFro mNow(30, " %m/%d/%Y @  09:00")
  46       @thirt yOneDaysLa ter = getD ateNthDays FromNow(31 , "%m/%d/% Y @ 09:00" )
  47       @seven DaysLater  = getDateN thDaysFrom Now(7, "%m /%d/%Y")
  48       @@time Slot = "11 :00"
  49       @frien dly_name =  "Facility  Friendly  Text"
  50       @clini c_friendly _name ="JP  PRIMARY C ARE DR. CR EAMER"
  51       @locat ion = "BOS TON HCS VA MC"
  52       @clini c = PRIMAR Y_CARE.upc ase.strip
  53       #cance l existing  appointme nt
  54         @cancel_ap pointment  = CancelAp pointment. new("CLINI C_BASED_BO STON", "52 3","#{ pw_reda c t e d ['userid'] }")
  55       @cance l_appointm ent.update _appointme nt_obj("ap pointmentT ime", "#{@ sevenDaysL ater} 11:0 0:00")
  56       @cance l_appointm ent.cancel _appointme nt()
  57       restor eCollectio n("custom- friendly-t ext", "var -utility",  "facility _friendly_ name.json" , @db)
  58       restor eCollectio n("clinica l-services ", "var-ut ility", "c linical_se rvices_def ault.json" , @db)
  59       restor eCollectio n("directB ookingElig ibilityCri teria", "v ar-utility ", "direct Scheduling Enabled.js on", @db)
  60       restor eCollectio n("request Eligibilit yCriteria" , "var-uti lity", "re questEligi bilityCrit eria.json" , @db)
  61       delete PatientDat a("1113138 327")
  62         @common.lo ginEndsOnH ome( pw_reda c t e d )
  63       @landi ng_appoint ments.appo intment_he ader_eleme nt.when_pr esent(TIME _OUT_LIMIT )
  64       @commo n.selectAd dAppointme ntButton(" VA")
  65       @@cc_e nabled = @ common.ccE nabled
  66       @new_a ppointment .createApp ointment(P RIMARY_CAR E, '523',  '32', 'tes t', @seven DaysLater,  @@timeSlo t, 'testAu tomation@t estAutomat ionxyz.com ')
  67       @@setD ate = NewA ppointment Request.bo okedDate
  68       button _element =  @driver.b utton(:id  => 'back-b tn')
  69       @drive r.execute_ script("$( arguments[ 0]).click( );",button _element)
  70       @commo n.waitWhil eSpinnerPr esent
  71  
  72     end
  73  
  74     after(:a ll) do
  75  
  76       @drive r.close
  77     end
  78  
  79     context  "AC# VAR-2 049|TC# VA R-2235: Bo oked Appoi ntment - C ancel Appo intment
  80               AC# VAR-3 165|TC# VA R-3166: Di rect Appoi ntment - A dd Reason  for Cancel lation" do
  81  
  82       it "Sh ould open  apointment  details a nd verify  cancel app ointment b uttoon is  present" d o
  83         @lan ding_appoi ntments.re fresh
  84         @com mon.waitWh ileSpinner Present
  85         slee p 2
  86         @lan ding_appoi ntments.ap pointment_ header_ele ment.when_ present(TI ME_OUT_LIM IT)
  87         Wati r::Wait.un til {@land ing_appoin tments.app ointment_t able_list_ elements.l ength >= 1 }
  88         @@se lectedDay  = getDayof Week(@@set Date)
  89         @@ti meSlot = @ @timeSlot. gsub!(':',  '')
  90         all_ appointmen ts = @land ing_appoin tments.lis t_of_appoi ntments_el ements
  91         appo intment_to _select =  "View deta ils for yo ur appoint ment," + " \n" + "Dat e/Time:" +  "\n" + "# {@@selecte dDay}," +  " #{@@setD ate}" + "\ n" + "#{@@ timeSlot}"  + "\n" +  "#{@@selec tedDay}, # {@@setDate } #{@@time Slot.gsub( "", " ")}"  + "\n" +  "Details:"  + "\n" +  "VA Facili ty Appoint ment" + "\ n" +"#{@lo cation}" +  "\n" + "# {@clinic_f riendly_na me}" + "\n " + "Also  called: #{ @clinic}"  + "\n" + " Prepare/Jo in:" + "\n " +"Prepar e for your  appointme nt"
  92         @lan ding_appoi ntments.op enIfAppoin tmentExist s(all_appo intments,  appointmen t_to_selec t)
  93         @com mon.waitWh ileSpinner Present
  94         expe ct(@detail .cancel_ap pointment? ).to eq(tr ue)
  95       end
  96  
  97       it "sh ould verif y Cancel A ppointment  button te xt" do
  98         expe ct(@detail .cancel_ap pointment_ element.te xt).to eq( "Cancel Ap pointment" )
  99       end
  100  
  101       it "Sh ould verif y Cancel A ppointment  Modal is  displayed"  do
  102         @det ail.clickC ancelAppoi ntment
  103         expe ct(@modal. modalTitle ).to eq('C ancel Appo intment')
  104       end
  105  
  106       it "Sh ould verif y details  on the Can cel Appoin tment moda l" do
  107         expe cted_text  = [\
  108            " Cancel App ointment",
  109            " * required  field",
  110            " * Reason f or Cancell ation",
  111            " Select",
  112            " DEATH IN F AMILY",
  113            " OTHER",
  114            " TRANSFER O PT CARE TO  OTHER VA" ,
  115            " TRAVEL DIF FICULTY",
  116            " UNABLE TO  KEEP APPOI NTMENT",
  117            " WEATHER",
  118            " Confirm Ca ncellation ",
  119            " Close with out Cancel ling"
  120  
  121         ]
  122         actu al_text =  @detail.ca ncel_reaso n_section_ element.te xt.split(" \n")
  123         expe cted_text. each_with_ index do |  expectedS creenRow,  i |
  124           ex pect(actua l_text[i]) .to eq(exp ectedScree nRow)
  125         end
  126       end
  127  
  128       it "sh ould verif y close wi thout canc elling ret urn to app ointment d etails" do
  129         @det ail.clickC loseWithou tCancellin g
  130         expe ct(@detail .has_expec ted_title? ).to eq(tr ue)
  131       end
  132  
  133       it "sh ould verif y Reason f or Cancell ation is r equired" d o
  134         @det ail.clickC ancelAppoi ntment
  135         @det ail.clickC onfirmCanc ellation
  136         veri fyErrorMes sage("Reas on for Can cellation  field is r equired.")
  137       end
  138  
  139       it "Sh ould verif y Cancel A ppointment  button, c onfirmatio n modal" d o
  140         @det ail.select ReasonForC ancellatio n("TRANSFE R OPT CARE  TO OTHER  VA")
  141         slee p 2
  142         @det ail.clickC onfirmCanc ellation
  143         expe ct(@modal. modalTitle ).to eq('A ppointment  Cancelled ')
  144       end
  145  
  146       it "sh ould verif y Appointm ent Cancel led Modal  content" d o
  147         expe ct(@modal. content_el ement.text ).to eq("Y our appoin tment has  been succe ssfully ca ncelled.   It will no  longer be  visible i n your app ointment l ist.")
  148       end
  149  
  150       it "Sh ould Verif y a button  with text  'OK' exis ts" do
  151         expe ct(@modal. buttons_el ements[0]. text).to e q("OK")
  152       end
  153  
  154       it "Sh ould verif y OK butto n, selecti ng closes  the modal,  navigates  back to a ppointment  list" do
  155         @mod al.buttons _elements[ 0].click
  156         @lan ding_appoi ntments.ap pointment_ header_ele ment.when_ present(TI ME_OUT_LIM IT)
  157         expe ct(@landin g_appointm ents.has_e xpected_ti tle?).to e q(true)
  158       end
  159  
  160       it "Ve rify resiz ing window  to iPhone  display r emoves bac k button l abel" do
  161         resi zeWindowTo Phone()
  162         Wati r::Wait.un til {@land ing_appoin tments.app ointment_b tn_label = = ""}
  163         expe ct(@landin g_appointm ents.appoi ntment_btn _label).to  eq("")
  164       end
  165  
  166     end
  167   end
  168  
  169  
  170  
  171  
  172  
  173  
  174  
  175  
  176