262. 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.

262.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 booked_appointment_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\appointments booked_appointment_details_spec.rb Fri Dec 7 13:25:46 2018 UTC

262.2 Comparison summary

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

262.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

262.4 Active regular expressions

No regular expressions were active.

262.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-1922: Bo oked Appoi ntment - D etailed Vi ew ]
  25              [Story# VA R-3614: Ap pointment  Details -  Add Facili ty Name]
  26              [Story# VA R-2661: Ap pointment  Details -  Export to  Electronic  Calendar]
  27              [Story# VA R-4282: Di sable canc el appoint ment butto n for 10/2 0 min slot s, variabl e length a ppointment s, and odd  start tim es]
  28              [Task# VAR -7402: Rem ove block  on canceli ng 10/20 a nd Variabl e appointm ents]
  29              [Story#VAR -11746: Di splay Clin ic Locatio n friendly  name in A ppointment  List]' do
  30     include  DriverUtil ity
  31     include  OracleUtil ity
  32     include  DateUtilit y
  33     include  MongoUtili ty
  34  
  35     before(: all) do
  36       initia lizeConfig urations(V AR_BASE_UR L)
  37       @landi ng_appoint ments = La ndingAppoi ntments.ne w(@driver)
  38       @login  = Login.n ew(@driver )
  39       @eula  = Eula.new (@driver)
  40       @commo n = Common .new(@driv er)
  41       @modal  = Modal.n ew(@driver )
  42       @detai l = Booked Appointmen tDetail.ne w(@driver)
  43       @error  = Error_V alidation. new(@drive r)
  44       @new_a ppointment  = NewAppo intmentReq uest.new(@ driver)
  45       @db =  connectToM ongoDB("va r-utility" )
  46  
  47       @tomor row = getD ateNthDays FromNow(1,  "%m/%d/%Y  @ 0900")
  48       @twoDa ysLater =  getDateNth DaysFromNo w(2, "%m/% d/%Y @ 090 0")
  49       @thirt yDaysLater  = getDate NthDaysFro mNow(30, " %m/%d/%Y @  0900")
  50       @thirt yOneDaysLa ter = getD ateNthDays FromNow(31 , "%m/%d/% Y @ 0900")
  51       @seven DaysLater  = getDateN thDaysFrom Now(7, "%m /%d/%Y")
  52       @@time Slot = "11 :00"
  53       @@all_ appointmen ts_dates =  '';
  54       @frien dly_name =  "Facility  Friendly  Text"
  55       @clini c_friendly _name ="JP  PRIMARY C ARE DR. CR EAMER"
  56       @locat ion = "BOS TON HCS VA MC"
  57       @clini c = PRIMAR Y_CARE.upc ase.strip
  58       #cance l existing  appointme nt
  59         @cancel_ap pointment  = CancelAp pointment. new("CLINI C_BASED_BO STON", "52 3","#{ pw_reda c t e d ['userid'] }")
  60       @cance l_appointm ent.update _appointme nt_obj("ap pointmentT ime", "#{@ sevenDaysL ater} 11:0 0:00")
  61       @cance l_appointm ent.cancel _appointme nt()
  62       restor eCollectio n("siteSup portingVAR ", "var-ut ility", "s ites-suppo rting-var- exported2. json", @db )
  63       restor eCollectio n("custom- friendly-t ext", "var -utility",  "facility _friendly_ name.json" , @db)
  64       restor eCollectio n("clinica l-services ", "var-ut ility", "c linical_se rvices_def ault.json" , @db)
  65       restor eCollectio n("directB ookingElig ibilityCri teria", "v ar-utility ", "direct Scheduling Enabled.js on", @db)
  66       restor eCollectio n("request Eligibilit yCriteria" , "var-uti lity", "re questEligi bilityCrit eria.json" , @db)
  67       delete PatientDat a("1113138 327")
  68         @common.lo ginEndsOnH ome( pw_reda c t e d )
  69       @landi ng_appoint ments.appo intment_he ader_eleme nt.when_pr esent(TIME _OUT_LIMIT )
  70  
  71     end
  72  
  73     after(:a ll) do
  74  
  75       @drive r.close
  76     end
  77  
  78     context  'AC#VAR-20 48|TC#VAR- 2230: Book ed Appoint ment - Det ail view
  79               AC#VAR-37 07|TC#VAR- 3708:  Add  Facility  Name Crite ria
  80               AC#VAR-37 11|TC#VAR- 3712: Test  Export to  Electorni c Calendar
  81               AC#VAR-11 910|TC#VAR 11911: Dis play Clini c Location  friendly  name in Ap pointment  List' do
  82  
  83       it "Sh ould verif y Booked a ppointment  Table sor ted by dat e" do
  84         @com mon.select AddAppoint mentButton ("VA")
  85         @new _appointme nt.createA ppointment (PRIMARY_C ARE, '523' , '32', 't est', @sev enDaysLate r, @@timeS lot, 'test Automation @testAutom ationxyz.c om')
  86         @@se tDate = Ne wAppointme ntRequest. bookedDate
  87         @@se lectedSlot  = @@setDa te
  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         @com mon.waitWh ileSpinner Present
  91         @lan ding_appoi ntments.re fresh
  92         @com mon.waitWh ileSpinner Present
  93         slee p 2
  94         @lan ding_appoi ntments.ap pointment_ header_ele ment.when_ present(TI ME_OUT_LIM IT)
  95         Wati r::Wait.un til {@land ing_appoin tments.app ointment_t able_list_ elements.l ength >= 1 }
  96         @@al l_appointm ents_dates  = @landin g_appointm ents.list_ of_appoint ment_dates _elements
  97         expe ct(@landin g_appointm ents.areCo lumnsSorte d?(@@all_a ppointment s_dates)). to eq(true )
  98       end
  99  
  100       it 'Sh ould Verif y clinic f riendly na me and det ails for r ecently bo oked appoi ntment in  list' do
  101  
  102         @@se lectedDay  = getDayof Week(@@sel ectedSlot)
  103         @@ti meSlot = @ @timeSlot. gsub!(':',  '')
  104         all_ appointmen ts = @land ing_appoin tments.lis t_of_appoi ntments_el ements
  105         appo intment_to _verify =  "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"
  106         expe ct(@landin g_appointm ents.verif yAppointme ntDetailsI nList(all_ appointmen ts, appoin tment_to_v erify)).to  eq(true)
  107       end
  108  
  109       it 'Sh ould verif y Appointm ent is dis played in  list after  app refre sh' do
  110         @lan ding_appoi ntments.cl ickRefresh
  111         @com mon.waitWh ileSpinner Present
  112         slee p 2
  113         @lan ding_appoi ntments.ap pointment_ header_ele ment.when_ present(TI ME_OUT_LIM IT)
  114         Wati r::Wait.un til {@land ing_appoin tments.app ointment_t able_list_ elements.l ength >= 1 }
  115         all_ appointmen ts = @land ing_appoin tments.lis t_of_appoi ntments_el ements
  116         appo intment_to _verify =  "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"
  117         expe ct(@landin g_appointm ents.verif yAppointme ntDetailsI nList(all_ appointmen ts, appoin tment_to_v erify)).to  eq(true)
  118  
  119       end
  120  
  121       it "Sh ould Verif y Detail s creen for  booked app ointment"  do
  122         all_ appointmen ts = @land ing_appoin tments.lis t_of_appoi ntments_el ements
  123         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"
  124         @lan ding_appoi ntments.op enIfAppoin tmentExist s(all_appo intments,  appointmen t_to_selec t)
  125         @com mon.waitWh ileSpinner Present
  126         expe cted_text  = [\
  127              "Date and  Time:" + "  #{@@selec tedDay},"  + " #{@@se tDate}",
  128              "Date:" +  " #{@@sele ctedDay}," + " #{@@se tDate}",
  129              @@timeSlot ,
  130              "Time: #{@ @timeSlot. gsub("", "  ")}",
  131              "Add to Ca lendar",
  132              "Details:  " + "#{@lo cation}",
  133              "#{@clinic _friendly_ name}",
  134              "Also call ed: #{@cli nic}",
  135              "Please ar rive 30 mi nutes befo re your sc heduled ti me unless  otherwise  directed.  VA Facilit y Locator" ,
  136              "Cancel Ap pointment" ,
  137              "Reason fo r Appointm ent: test"
  138         ]
  139         @det ail.appoin tment_deta ils_group_ element.wh en_present (TIME_OUT_ LIMIT)
  140         actu al_text =  @detail.ap pointment_ details_gr oup_elemen t.text.spl it("\n")
  141         actu al_text =  actual_tex t.reject {  |c| c.emp ty? }
  142         expe cted_text. each_with_ index do |  expectedS creenRow,  i |
  143           ex pect(actua l_text[i]. gsub(/\s+/ , '')).to  eq(expecte dScreenRow .gsub(/\s+ /, ''))
  144         end
  145  
  146       end
  147  
  148       it "Sh ould verif y details  on Back ic on (<): sh own left j ustified o n the subh eader bar,  left just ified" do
  149         expe ct(@detail .back_btn_ element.ex ists?).to  eq(true)
  150         expe ct(@detail .back_btn_ element.at tribute("c lass")).to  include(" ui-btn-lef t")
  151         expe ct(@detail .back_labe l).to eq(" Appointmen ts/Request s")
  152         expe ct(@detail .back_btn_ element.vi sible?).to  eq(true)
  153         expe ct(@detail .back_btn_ element.at tribute("a ria-label" )).to eq(" Return to  Appointmen ts and Req uests")
  154  
  155       end
  156  
  157  
  158       it "Sh ould verif y Calendar  export ic on and lin k Text 'Ad d to Calen dar'" do
  159         expe ct(@detail .add_to_ca lendar_ele ment.visib le?).to eq (true)
  160         expe ct(@detail .calendar_ icon_eleme nt.visible ?).to eq(t rue)
  161         expe ct(@detail .add_to_ca lendar_ele ment.text. strip).to  eq("Add to  Calendar" )
  162       end
  163  
  164     end
  165  
  166     #TODO: D O NOT DELE TE. THIS T EST NEEDS  TO BE ENAB LED WHEN C LINICS WIT H Mentione d slots ar e availabl e
  167   =begin
  168     context  "AC#VAR-43 07|TC#4308 : Disable  appt cance l for appt s booked a t clinics  with 10/20  min slot  and variab le appt le ngth" do
  169         it " Display te xt message  'If you n eed to can cel this a ppointment , please c ontact the  facility  directly.'  instead o f cancel b utton" do
  170           @d etail.back _btn
  171  
  172           #m ock data
  173           Wa tir::Wait. until {@la nding_appo intments.a ppointment _table_lis t_elements .length >=   1}
  174           re sizeWindow ToDefault
  175             @common.lo goutAndLog backWithAD ifferentUs er( pw_reda c t e d )
  176  
  177           @l anding_app ointments. primary_he ader_eleme nt.when_pr esent(TIME _OUT_LIMIT )
  178  
  179           Wa tir::Wait. until {@la nding_appo intments.a ppointment _table_lis t_elements .length ==  4}
  180           ex pect(@land ing_appoin tments.app ointment_t able_list_ elements.l ength).to  eq(4)
  181           @c ommon.wait WhileSpinn erPresent( )
  182  
  183           #s cenarios
  184           #1 . 3 * 10 m in slots ( variable l ength) - c an cancel
  185           #2 . 1 * 10 m in slot -  can cancel
  186           #3   1 * 20 m in slot -  can cancel
  187           #4   30 min s lot & odd  time start  10:15:00
  188  
  189           fo r i in 0.. .4
  190              @landing_a ppointment s.appointm ent_table_ list_eleme nts[i].cli ck
  191              @common.wa itWhileSpi nnerPresen t
  192  
  193              @detail.ap pointment_ details_gr oup_elemen t.when_pre sent(TIME_ OUT_LIMIT)
  194              expect(@de tail.has_e xpected_ti tle?).to e q(true)
  195  
  196              #cancel is  disabled  only for O dd Start T ime
  197              if i == 3  then
  198                expect(@ detail.can cel_by_con tacting_fa cility_mes sage_eleme nt.text).t o eq('If y ou need to  cancel th is appoint ment, plea se contact  the facil ity direct ly.')
  199              else
  200  
  201                expected _text = [\
  202                                    "I need to  cancel th is appoint ment",
  203                                    "Yes", "No "
  204                                 ]
  205  
  206                actual_t ext = @det ail.cancel _reason_se ction_elem ent.text.s plit("\n")
  207  
  208                expected _text.each _with_inde x do | exp ectedScree nRow, i |
  209                  expect (actual_te xt[i]).to  eq(expecte dScreenRow )
  210                end
  211  
  212              end
  213  
  214  
  215              @detail.ba ck_btn
  216              @common.wa itWhileSpi nnerPresen t
  217  
  218              Watir::Wai t.until {@ landing_ap pointments .appointme nt_table_l ist_elemen ts.length  == 4}
  219              @landing_a ppointment s.primary_ header_ele ment.when_ present(TI ME_OUT_LIM IT)
  220  
  221           en d
  222         end
  223     end
  224   =end
  225   end
  226  
  227  
  228  
  229  
  230  
  231  
  232  
  233  
  234