From 3988a06cbfb93e8030620b30431cae10c9fb0276 Mon Sep 17 00:00:00 2001 From: Kat Date: Fri, 26 Jul 2024 12:36:50 +0100 Subject: [PATCH] Add some more page tests --- spec/features/accessibility_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/features/accessibility_spec.rb b/spec/features/accessibility_spec.rb index dfa1c2eb2..d0c218445 100644 --- a/spec/features/accessibility_spec.rb +++ b/spec/features/accessibility_spec.rb @@ -177,4 +177,18 @@ RSpec.describe "Accessibility", js: true do end end end + + context "when viewing other pages" do + [{ path: "/", title: "homepage" }, + { path: "/guidance", title: "guidance" }, + { path: "/privacy-notice", title: "privacy notice" }, + { path: "/lettings-logs/bulk-upload-logs/guidance?form[year]=2024&referrer=home", title: "lettings BU guidance" }, + { path: "/sales-logs/bulk-upload-logs/guidance?form[year]=2024&referrer=home", title: "sales BU guidance" }].each do |test_case| + it "is has accessible #{test_case[:title]} page" do + visit(test_case[:path]) + expect(page).to have_current_path(test_case[:path]) + expect(page).to be_axe_clean.according_to :wcag2aa + end + end + end end