Summary Table
| Categories |
Total Count |
| PII |
0 |
| URL |
0 |
| DNS |
0 |
| EKL |
0 |
| IP |
0 |
| PORT |
0 |
| VsID |
0 |
| CF |
0 |
| AI |
0 |
| VPD |
0 |
| PL |
0 |
| Other |
0 |
File Content
require 'rspec'
require_relative '../rspec_helper'
require_relative '../../pages/vaToolSet/vaToolSet_pageObject'
require_relative '../../pages/varUtility/landing'
require_relative '../../common/accessVarUtility'
require_relative '../../pages/landing_page'
describe '[VARUT-1641: Select Facility Location - Pre Authorized Page View]
[VARUT-1755: Facility Selection - Require for first time user]' do
include DriverUtility
include DateUtility
before(:all) do
initializeConfigurations(BASE_URL)
@landing_page = LandingPage.new(@driver)
@vts_po = VaToolSet_PageObject.new(@driver)
@landing = Landing.new(@driver)
end
after(:all) do
@driver.close
end
context '[AC#VARUT-1744|TC#VARUT-1745: Select Facility Location - Pre Authorized Page View ]
[AC#VARUT-1770|TC#VARUT1771: Facility Selection - Require for first time user]' do
it "Login" do
@vts_po.accessVarUtility.access_var_utility(UserStaff01)
@vts_po.landing.rightFooter_element.when_visible(TIME_OUT_LIMIT)
Watir::Wait.until {@vts_po.landing.rightFooter == "Logged in as Staff01, Test01"}
expect(@vts_po.landing.rightFooter).to eq("Logged in as Staff01, Test01")
end
it "Verify pre authorized page - Details" do
@vts_po.landing.welcome_message_element.when_visible(TIME_OUT_LIMIT)
@vts_po.landing.facility_location?
@vts_po.landing.clickViewSettings
expect(@vts_po.landing.primary_header).to eq("VAR Utility - Select Facility Location")
homeWelcomeMessage = @vts_po.landing.welcome_message.split("\n")
#for screen reader
expect(homeWelcomeMessage[1]).to eq( "Welcome Test01 Staff01")
today = getDateNthDaysAgo(0, "%B %d, %Y")
expect(homeWelcomeMessage[2]).to eq(today)
expect(homeWelcomeMessage[3]).to eq("In order to support requests and direct scheduling options in VAR, settings for each facility location under BOSTON HCS VAMC must be individually configured.")
end
it "Verify Facility list is sorted and default option displayed for dropdown is 'select institution'" do
expect(@landing_page.isFacilityListSorted?).to eq(true)
expect(@landing_page.facility_location_element.selected?('Select:'))
end
it "Verify error message is displayed if no facility selected" do
@landing.clickViewSettings
@landing_page.error_message_displayed_element.wait_until_present(TIME_OUT_LIMIT)
expect(@landing_page.error_message_displayed_element.text).to eq("The following errors were found:\nSelect a Facility Location is required")
end
it "Verify selecting view settings button for each facility takes user to VAR Utility page - Details" do
@landing_page.facility_location_element.wait_until_present(TIME_OUT_LIMIT)
@landing.selectFacilityLocation('BOSTON HCS VAMC')
@landing.clickViewSettings
@landing_page.change_location_element.wait_until_present(TIME_OUT_LIMIT)
@driver.back
@landing_page.facility_location_element.wait_until_present(TIME_OUT_LIMIT)
@landing.selectFacilityLocation('BROCKTON VAMC')
@landing.clickViewSettings
@landing_page.change_location_element.wait_until_present(TIME_OUT_LIMIT)
@driver.back
@landing_page.facility_location_element.wait_until_present(TIME_OUT_LIMIT)
@landing.selectFacilityLocation('FRAMINGHAM')
@landing.clickViewSettings
@landing_page.change_location_element.wait_until_present(TIME_OUT_LIMIT)
@driver.back
@landing_page.facility_location_element.wait_until_present(TIME_OUT_LIMIT)
@landing.selectFacilityLocation('QUINCY')
@landing.clickViewSettings
@landing_page.change_location_element.wait_until_present(TIME_OUT_LIMIT)
@driver.back
@landing_page.facility_location_element.wait_until_present(TIME_OUT_LIMIT)
end
end
end