From 9f721a7e1f55ef968a8670bc4dbb8e30a3616d43 Mon Sep 17 00:00:00 2001 From: Camille Villa <5402927+camillevilla@users.noreply.github.com> Date: Tue, 26 Dec 2023 15:53:33 -0800 Subject: [PATCH] Update be_accessible syntax --- spec/features/about_spec.rb | 2 +- spec/features/admin/admin_spec.rb | 8 +++---- spec/features/homepage_spec.rb | 2 +- .../nominate_a_practice_page_spec.rb | 2 +- spec/features/pages/show_page_spec.rb | 2 +- spec/features/practice_editor/about_spec.rb | 2 +- .../practice_editor/adoptions_spec.rb | 4 ++-- .../practice_editor/authorization_spec.rb | 8 +++---- spec/features/practice_editor/editors_spec.rb | 2 +- .../implementation/implementation_spec.rb | 2 +- .../implementation/timeline_spec.rb | 4 ++-- .../practice_editor/instructions_spec.rb | 2 +- .../introduction/introduction_spec.rb | 2 +- spec/features/practice_editor/metrics_spec.rb | 2 +- .../practice_editor/overview/overview_spec.rb | 4 ++-- .../practice_editor/publish_practice_spec.rb | 2 +- .../practice_editor/step_indicator_spec.rb | 2 +- spec/features/practice_partners_spec.rb | 4 ++-- spec/features/practice_spec.rb | 24 +++++++++---------- spec/features/practice_viewer/contact_spec.rb | 6 ++--- .../practice_viewer/introduction_spec.rb | 4 ++-- spec/features/register_spec.rb | 4 ++-- spec/features/retire_practice_spec.rb | 2 +- spec/features/search_spec.rb | 6 ++--- spec/features/shared/breadcrumbs_spec.rb | 2 +- spec/features/terms_and_conditions_spec.rb | 2 +- .../users/recommended_for_you_spec.rb | 4 ++-- spec/features/users/user_profile_spec.rb | 10 ++++---- spec/features/va_facility_spec.rb | 2 +- 29 files changed, 61 insertions(+), 61 deletions(-) diff --git a/spec/features/about_spec.rb b/spec/features/about_spec.rb index aaf64c4836..79eadb8028 100644 --- a/spec/features/about_spec.rb +++ b/spec/features/about_spec.rb @@ -11,7 +11,7 @@ describe 'Intro section' do it '\'Diffusion of Excellence\' link should take the user to the Diffusion of Excellence page at va.gov' do - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 new_window = window_opened_by { click_link('Diffusion of Excellence') } within_window new_window do diff --git a/spec/features/admin/admin_spec.rb b/spec/features/admin/admin_spec.rb index 9ba7e0645c..bcfe4d1c5b 100644 --- a/spec/features/admin/admin_spec.rb +++ b/spec/features/admin/admin_spec.rb @@ -58,7 +58,7 @@ def visit_practice_show it 'if not logged in, should be redirected to sign_in page' do visit '/admin' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_current_path(new_user_session_path) end @@ -66,7 +66,7 @@ def visit_practice_show login_as(@user, scope: :user, run_callbacks: false) visit '/admin' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_current_path(root_path) expect(page).to have_content('Unauthorized access!') end @@ -75,7 +75,7 @@ def visit_practice_show login_as(@admin, scope: :user, run_callbacks: false) visit '/admin' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_current_path(admin_root_path) expect(page).to have_link('General', href: '#general') @@ -101,7 +101,7 @@ def visit_practice_show login_as(@admin, scope: :user, run_callbacks: false) visit '/admin' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_current_path(admin_root_path) within(:css, '#header') do diff --git a/spec/features/homepage_spec.rb b/spec/features/homepage_spec.rb index 4a351f5226..01c8ca4b50 100644 --- a/spec/features/homepage_spec.rb +++ b/spec/features/homepage_spec.rb @@ -39,7 +39,7 @@ describe 'search section' do it 'should allow the user to search for practices in a number of ways' do - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 # search for a practice using the search field fill_in('dm-homepage-search-field', with: 'James A. Haley') diff --git a/spec/features/nominate_practices/nominate_a_practice_page_spec.rb b/spec/features/nominate_practices/nominate_a_practice_page_spec.rb index d93366ac27..1f95af0422 100644 --- a/spec/features/nominate_practices/nominate_a_practice_page_spec.rb +++ b/spec/features/nominate_practices/nominate_a_practice_page_spec.rb @@ -4,7 +4,7 @@ context 'Render' do it 'renders form' do visit '/nominate-an-innovation' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('Nominate an innovation') expect(page).to have_content('VA staff and collaborators are welcome to nominate active innovations for consideration on the Diffusion Marketplace using the form below.') end diff --git a/spec/features/pages/show_page_spec.rb b/spec/features/pages/show_page_spec.rb index e57758f8c9..b0c9295a51 100644 --- a/spec/features/pages/show_page_spec.rb +++ b/spec/features/pages/show_page_spec.rb @@ -309,7 +309,7 @@ visit '/programming/javascript' # Make sure the map components are 508 compliant - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_css('.page-map-component', count: 2) within(all('.page-map-component').first) do expect_marker_ct(1) diff --git a/spec/features/practice_editor/about_spec.rb b/spec/features/practice_editor/about_spec.rb index 3d6d2a3854..614d1b6755 100644 --- a/spec/features/practice_editor/about_spec.rb +++ b/spec/features/practice_editor/about_spec.rb @@ -23,7 +23,7 @@ end it 'should be there' do - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('About') expect(page).to have_content('This section helps people understand how your innovation started and introduces the original team.') end diff --git a/spec/features/practice_editor/adoptions_spec.rb b/spec/features/practice_editor/adoptions_spec.rb index 5c0f1a6376..651af0bd0c 100644 --- a/spec/features/practice_editor/adoptions_spec.rb +++ b/spec/features/practice_editor/adoptions_spec.rb @@ -40,7 +40,7 @@ ) login_as(@admin, :scope => :user, :run_callbacks => false) visit practice_adoptions_path(@practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 end after do @@ -128,7 +128,7 @@ def submit_form expect(page).to have_content('Success!') expect(page).to have_content('In-progress adoption: 1') end - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 # it should create another one find('#add_adoption_button').click diff --git a/spec/features/practice_editor/authorization_spec.rb b/spec/features/practice_editor/authorization_spec.rb index 416b9bb5c4..3f66d3a891 100644 --- a/spec/features/practice_editor/authorization_spec.rb +++ b/spec/features/practice_editor/authorization_spec.rb @@ -17,7 +17,7 @@ it 'should allow admin level users to edit a practice' do login_as(@admin, :scope => :user, :run_callbacks => false) visit practice_path(@practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(@practice.name) end @@ -25,7 +25,7 @@ login_as(@approver, :scope => :user, :run_callbacks => false) @user_practice.update(approved: true, published: true) visit practice_path(@user_practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_link(href: "/innovations/#{@user_practice.slug}/edit/metrics") end @@ -35,7 +35,7 @@ login_as(@user_2, :scope => :user, :run_callbacks => false) visit practice_introduction_path(@practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('Introduction') expect(page).to have_content('Introduce your innovation and provide a brief summary to people who may be unfamiliar with it.') end @@ -43,7 +43,7 @@ it 'should not allow the following user types to edit a practice: non-admins, non-practice owners, and non-practice editors' do login_as(@user, :scope => :user, :run_callbacks => false) visit practice_path(@practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(@practice.name) expect(page).to_not have_link(href: "/innovations/#{@practice.slug}/edit/instructions") end diff --git a/spec/features/practice_editor/editors_spec.rb b/spec/features/practice_editor/editors_spec.rb index f42f998f14..ecf6774842 100644 --- a/spec/features/practice_editor/editors_spec.rb +++ b/spec/features/practice_editor/editors_spec.rb @@ -29,7 +29,7 @@ def login_and_visit_editors(user) it 'should be there' do login_and_visit_editors(@admin) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('Editors') expect(page).to have_content('E-mail the people who can help you edit this innovation page. Only @va.gov emails are allowed.') end diff --git a/spec/features/practice_editor/implementation/implementation_spec.rb b/spec/features/practice_editor/implementation/implementation_spec.rb index 3ae1a37bbe..cdc2511cc8 100644 --- a/spec/features/practice_editor/implementation/implementation_spec.rb +++ b/spec/features/practice_editor/implementation/implementation_spec.rb @@ -15,7 +15,7 @@ add_another_btns.each do |btn| btn.click end - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 end end end diff --git a/spec/features/practice_editor/implementation/timeline_spec.rb b/spec/features/practice_editor/implementation/timeline_spec.rb index 5f4f8bbacf..635e9a663d 100644 --- a/spec/features/practice_editor/implementation/timeline_spec.rb +++ b/spec/features/practice_editor/implementation/timeline_spec.rb @@ -12,7 +12,7 @@ login_as(@admin, :scope => :user, :run_callbacks => false) visit practice_implementation_path(@practice) page.driver.browser.manage.window.resize_to(1200, 600) # need to set this otherwise mobile version of editor displays - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 @time_frame = '3 Months' @milestone = 'Test milestone' @add_timeline_step_button = find('#link_to_add_button_timeline') @@ -20,7 +20,7 @@ it 'should be there' do @save_button = find('#practice-editor-save-button') - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('Timeline') expect(page).to have_content('Add timeline step') fill_in_core_people_field diff --git a/spec/features/practice_editor/instructions_spec.rb b/spec/features/practice_editor/instructions_spec.rb index 9b6ca4ee8d..03ca39a5d3 100644 --- a/spec/features/practice_editor/instructions_spec.rb +++ b/spec/features/practice_editor/instructions_spec.rb @@ -11,7 +11,7 @@ before do login_as(@admin, :scope => :user, :run_callbacks => false) visit practice_path(@practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 end it 'displays as a modal' do diff --git a/spec/features/practice_editor/introduction/introduction_spec.rb b/spec/features/practice_editor/introduction/introduction_spec.rb index 497d97d6c0..75398a0d7d 100644 --- a/spec/features/practice_editor/introduction/introduction_spec.rb +++ b/spec/features/practice_editor/introduction/introduction_spec.rb @@ -45,7 +45,7 @@ before do login_as(@admin, :scope => :user, :run_callbacks => false) visit_practice_edit - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 end it 'should display the content correctly' do diff --git a/spec/features/practice_editor/metrics_spec.rb b/spec/features/practice_editor/metrics_spec.rb index 7128023692..19997c9ec1 100644 --- a/spec/features/practice_editor/metrics_spec.rb +++ b/spec/features/practice_editor/metrics_spec.rb @@ -47,7 +47,7 @@ describe 'Authorization' do before do - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 end it 'Should allow authenticated users to view metrics' do diff --git a/spec/features/practice_editor/overview/overview_spec.rb b/spec/features/practice_editor/overview/overview_spec.rb index e27c599af5..b4fafb073b 100644 --- a/spec/features/practice_editor/overview/overview_spec.rb +++ b/spec/features/practice_editor/overview/overview_spec.rb @@ -13,9 +13,9 @@ describe 'view and editor' do it 'should be accessible' do visit practice_path(@practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 visit practice_overview_path(@practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 end it 'should be able to change the problem, solution, results, statements' do diff --git a/spec/features/practice_editor/publish_practice_spec.rb b/spec/features/practice_editor/publish_practice_spec.rb index 44dc84cad4..b744582152 100644 --- a/spec/features/practice_editor/publish_practice_spec.rb +++ b/spec/features/practice_editor/publish_practice_spec.rb @@ -28,7 +28,7 @@ before do login_as(@admin, :scope => :user, :run_callbacks => false) visit practice_introduction_path(@practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 @save_button = find('#practice-editor-save-button') end diff --git a/spec/features/practice_editor/step_indicator_spec.rb b/spec/features/practice_editor/step_indicator_spec.rb index b454c3c634..4389e80225 100644 --- a/spec/features/practice_editor/step_indicator_spec.rb +++ b/spec/features/practice_editor/step_indicator_spec.rb @@ -24,7 +24,7 @@ before do login_as(@admin, :scope => :user, :run_callbacks => false) visit practice_path(@practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 end it 'should display the step indicator on each page' do diff --git a/spec/features/practice_partners_spec.rb b/spec/features/practice_partners_spec.rb index e53df079ff..83a1e98e2b 100644 --- a/spec/features/practice_partners_spec.rb +++ b/spec/features/practice_partners_spec.rb @@ -47,7 +47,7 @@ it 'should navigate to strategic sponsors list page' do visit '/partners' # TODO: this is timing out in CI - # expect(page).to be_accessible.according_to :wcag2a, :section508 + # expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(current_path).to eq('/partners') end @@ -60,7 +60,7 @@ it 'should show the initiating facility\'s name' do @pr_1.update(initiating_facility: 'Foobar Facility') visit '/partners/diffusion-of-excellence' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(@pr_1.name) expect(page).to have_content('Foobar Facility') end diff --git a/spec/features/practice_spec.rb b/spec/features/practice_spec.rb index 702e7d6397..4d246ac01d 100644 --- a/spec/features/practice_spec.rb +++ b/spec/features/practice_spec.rb @@ -38,13 +38,13 @@ it 'should let unauthenticated users interact with public-facing practices' do # Visit an unpublished, unapproved, internal-facing practice visit '/innovations/the-best-practice-ever' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('You are not authorized to view this content.') @user_practice.update(approved: true, published: true, is_public: true) # Visit a published, approved, public-facing practice visit '/innovations/the-best-practice-ever' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('The Best Practice Ever!') expect(page).to have_content('Test Facility') end @@ -63,13 +63,13 @@ # Visit an individual practice that is approved and published visit practice_path(@practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(@practice.name) expect(page).to have_current_path(practice_path(@practice)) # Visit the Marketplace visit '/' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('We’re a discovery and collaboration tool that curates VA’s promising innovations, encourages their diffusion, and fosters engagement with greater healthcare communities.') expect(page).to have_link(href: '/about') expect(page).to have_content('Browse all innovations') @@ -86,7 +86,7 @@ # Visit user's own practice that is not approved or published visit practice_path(@user_practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_current_path(practice_path(@user_practice)) expect(page).to have_content(@user_practice.name) end @@ -95,7 +95,7 @@ login_as(@user2, :scope => :user, :run_callbacks => false) # Visit a user's practice that is not approved or published visit practice_path(@user_practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('We’re a discovery and collaboration tool that curates VA’s promising innovations, encourages their diffusion, and fosters engagement with greater healthcare communities.') expect(page).to have_current_path('/') end @@ -105,7 +105,7 @@ # Visit a user's practice that is not approved or published visit practice_path(@user_practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(@user_practice.name) expect(page).to have_current_path(practice_path(@user_practice)) end @@ -115,7 +115,7 @@ # Visit a user's practice that is not approved or published visit practice_path(@user_practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(@user_practice.name) expect(page).to have_current_path(practice_path(@user_practice)) end @@ -139,7 +139,7 @@ practice = Practice.create!(name: 'Another public practice', date_initiated: Time.now(), approved: true, published: true, initiating_facility_type: 'facility', tagline: 'Test tagline', user: @user2) PracticeOriginFacility.create!(practice: practice, facility_type: 0, va_facility: @facility_1) visit practice_path(practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(practice.name) expect(page).to have_content('Yakima VA Clinic') expect(page).to have_current_path(practice_path(practice)) @@ -151,7 +151,7 @@ login_as(@admin, :scope => :user, :run_callbacks => false) # Visit an individual Practice that is enabled visit practice_path(@enabled_practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(@enabled_practice.name) expect(page).to have_content(@enabled_practice.initiating_facility) expect(page).to have_current_path(practice_path(@enabled_practice)) @@ -173,7 +173,7 @@ @user_practice.update(published: true, approved: true, initiating_facility: 'Page VA Clinic') # Visit an individual Practice that is approved and published visit practice_path(@user_practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(@user_practice.name) expect(page).to have_content(@user_practice.initiating_facility) expect(page).to have_current_path(practice_path(@user_practice)) @@ -184,7 +184,7 @@ @user_practice.update(published: true, approved: true, difficulty_aggregate: 1, sustainability_aggregate: 2, number_departments: 3, it_required: true, process: 'New approach', implementation_time_estimate: '6 months', training_provider: 'Practice champion', training_test: true, need_new_license: true, training_length: '1 month') visit practice_path(@user_practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(@user_practice.name) expect(page).to have_content(@user_practice.initiating_facility) expect(page).to have_current_path(practice_path(@user_practice)) diff --git a/spec/features/practice_viewer/contact_spec.rb b/spec/features/practice_viewer/contact_spec.rb index 7be3bb5d5a..2c3980ad74 100644 --- a/spec/features/practice_viewer/contact_spec.rb +++ b/spec/features/practice_viewer/contact_spec.rb @@ -14,7 +14,7 @@ # Login as an authenticated user and visit the practice page login_as(user1, :scope => :user, :run_callbacks => false) visit practice_path(practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(practice.name) expect(page).to have_current_path(practice_path(practice)) expect(page).to have_css('.commontator') @@ -25,7 +25,7 @@ login_as(user2, :scope => :user, :run_callbacks => false) page.set_rack_session(:user_type => 'ntlm') visit practice_path(practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(practice.name) expect(page).to have_content("Other") expect(page).to have_content('I am currently adopting this innovation') @@ -36,7 +36,7 @@ # make the practice public, so the user is not redirected practice.update(is_public: true) visit practice_path(practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content(practice.name) expect(page).to have_current_path(practice_path(practice)) expect(page).to have_content('Comments and replies are disabled for retired innovations and non-VA users.') diff --git a/spec/features/practice_viewer/introduction_spec.rb b/spec/features/practice_viewer/introduction_spec.rb index eac9659179..10979a540f 100644 --- a/spec/features/practice_viewer/introduction_spec.rb +++ b/spec/features/practice_viewer/introduction_spec.rb @@ -96,7 +96,7 @@ describe 'action buttons' do before do visit practice_path(@pr_min) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 end it 'should exist' do @@ -118,7 +118,7 @@ describe 'see more buttons' do before do visit practice_path(@pr_max) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 end it 'should exist' do diff --git a/spec/features/register_spec.rb b/spec/features/register_spec.rb index 5eb4271eeb..05cd5a0314 100644 --- a/spec/features/register_spec.rb +++ b/spec/features/register_spec.rb @@ -10,7 +10,7 @@ click_on('Sign in') click_on('Register') - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(current_path).to eq('/users/sign_up') expect(page).to have_content('Register') @@ -20,7 +20,7 @@ fill_in('Password confirmation', with: 'Passwrrd') click_button('Register') - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('Email must use @va.gov email address') expect(page).to have_content('Email invalid') expect(page).to have_content('Password must include 6 unique characters') diff --git a/spec/features/retire_practice_spec.rb b/spec/features/retire_practice_spec.rb index 59d6285964..d9bf56c2ca 100644 --- a/spec/features/retire_practice_spec.rb +++ b/spec/features/retire_practice_spec.rb @@ -10,7 +10,7 @@ # Login as an authenticated user and visit the practice page login_as(@user, :scope => :user, :run_callbacks => false) visit practice_path(@practice) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('This innovation is no longer being updated.') expect(page).to have_content('Was not a good practice') expect(page).to have_content('Comments and replies are disabled for retired innovations and non-VA users.') diff --git a/spec/features/search_spec.rb b/spec/features/search_spec.rb index 32a99982c6..8d2eb9f858 100644 --- a/spec/features/search_spec.rb +++ b/spec/features/search_spec.rb @@ -237,12 +237,12 @@ def add_crh_adoptions_and_practice_origin_facilities it 'should only show approved and published practices' do visit_search_page - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 fill_in('dm-practice-search-field', with: 'Test') search - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 # do not show a practice that is not approved/published fill_in('dm-practice-search-field', with: 'practice') @@ -257,7 +257,7 @@ def add_crh_adoptions_and_practice_origin_facilities fill_in('dm-practice-search-field', with: 'practice') search - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('14 results') expect(page).to have_content(@practice2.name) end diff --git a/spec/features/shared/breadcrumbs_spec.rb b/spec/features/shared/breadcrumbs_spec.rb index 6cab15e947..530c922dac 100644 --- a/spec/features/shared/breadcrumbs_spec.rb +++ b/spec/features/shared/breadcrumbs_spec.rb @@ -142,7 +142,7 @@ fill_in('dm-navbar-search-desktop-field', with: 'the best') find('#dm-navbar-search-desktop-button').click expect(page).to have_content('The Best') - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 find("a[href='#{practice_path(@user_practice)}'][aria-hidden='true']").click expect(page).to have_css("#pr-view-introduction", visible: true) within(:css, '#breadcrumbs') do diff --git a/spec/features/terms_and_conditions_spec.rb b/spec/features/terms_and_conditions_spec.rb index 68af45e7dc..c930df0bd5 100644 --- a/spec/features/terms_and_conditions_spec.rb +++ b/spec/features/terms_and_conditions_spec.rb @@ -69,7 +69,7 @@ def expect_forced_terms_modal it 'Should display the terms and conditions page' do visit '/partners' click_link 'Terms and conditions' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('Terms and conditions') expect(current_path).to eq('/terms-and-conditions') expect(page).to have_content('VA systems are intended to be used by authorized users') diff --git a/spec/features/users/recommended_for_you_spec.rb b/spec/features/users/recommended_for_you_spec.rb index cb102dcb42..18575c0724 100644 --- a/spec/features/users/recommended_for_you_spec.rb +++ b/spec/features/users/recommended_for_you_spec.rb @@ -50,7 +50,7 @@ def login_and_visit_recommended_path(user) it 'should redirect the user to the login page if they are not logged in' do visit '/recommended-for-you' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('Diffusion Marketplace') expect(page).to have_content('Login') expect(page.current_path).to eq new_user_session_path @@ -59,7 +59,7 @@ def login_and_visit_recommended_path(user) it 'should allow the user to visit the recommended for you page if they are logged in' do login_and_visit_recommended_path(@user1) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('Recommended for you') expect(page).to have_content('Based on your location') expect(page.current_path).to eq recommended_for_you_path diff --git a/spec/features/users/user_profile_spec.rb b/spec/features/users/user_profile_spec.rb index fac6987601..32f10f1f24 100644 --- a/spec/features/users/user_profile_spec.rb +++ b/spec/features/users/user_profile_spec.rb @@ -14,7 +14,7 @@ it 'should not show the profile page of a different user and redirect them to the home page' do visit "/users/#{@user.id}" - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to_not have_content('Edit profile') expect(page.current_path).to eq root_path @@ -33,7 +33,7 @@ it 'if not logged in, should be redirected to landing page when accessing account edit' do visit '/users/edit/' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('Diffusion Marketplace') expect(page.current_path).to eq user_session_path end @@ -41,7 +41,7 @@ it 'if not logged in, should be redirected to landing page when accessing profile edit' do visit '/edit-profile/' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_content('Diffusion Marketplace') expect(page.current_path).to eq root_path end @@ -50,7 +50,7 @@ login_as(@user, scope: :user, run_callbacks: false) visit '/users/edit' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_selector("input[value='#{@user.email}']") end @@ -58,7 +58,7 @@ login_as(@user, scope: :user, run_callbacks: false) visit '/edit-profile' - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 fill_in('First name', with: 'Spongebob') fill_in('Last name', with: 'Squarepants') fill_in('Work phone number', with: '8675309') diff --git a/spec/features/va_facility_spec.rb b/spec/features/va_facility_spec.rb index 9d507a74e2..ad617ca7cc 100644 --- a/spec/features/va_facility_spec.rb +++ b/spec/features/va_facility_spec.rb @@ -57,7 +57,7 @@ it 'should be there' do visit '/facilities' expect(page).to have_selector('.dm-loading-spinner', visible: false) - expect(page).to be_accessible.according_to :wcag2a, :section508 + expect(page).to be_axe_clean.according_to :wcag2a, :section508 expect(page).to have_css('#dm-va-facilities-directory-table') expect(page).to have_current_path(va_facilities_path) expect(page).to have_content("Facilities")