Skip to content

Commit

Permalink
Add accessibility tests for page
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Nov 6, 2023
1 parent e8018d5 commit ed46e7a
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions spec/features/applications_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,34 @@
describe "Applications pages" do
include Devise::Test::IntegrationHelpers

# rubocop:disable RSpec/NoExpectationExample
it "renders the page", js: true do
before do
create(:geocoded_application,
address: "24 Bruce Road Glenbrook",
description: "A lovely house")
create(:geocoded_application,
address: "351 Pacific Hwy, Coffs Harbour NSW 2450",
description: "S4.55(1A) - Modification - alignment of 20 cabins rotated - positions of duplex cabins swapped with other cabins - 2 bedroom cabins changed to a duplex cabin 1 bedroom & studio")
end

describe "in the new design" do
before do
sign_in create(:confirmed_user, tailwind_theme: true, name: "Jane Ng")
end

describe "index page" do
before do
visit applications_path
end

it "passes accessibility tests", js: true do
expect(page).to be_axe_clean
end

sign_in create(:confirmed_user, tailwind_theme: true, name: "Jane Ng")
visit applications_path
page.percy_snapshot("Most recent applications across Australia")
# rubocop:disable RSpec/NoExpectationExample
it "renders the page", js: true do
page.percy_snapshot("Most recent applications across Australia")
end
# rubocop:enable RSpec/NoExpectationExample
end
end
# rubocop:enable RSpec/NoExpectationExample
end

0 comments on commit ed46e7a

Please sign in to comment.