Skip to content

Commit

Permalink
Merge pull request #359 from pulibrary/176-lockers-page
Browse files Browse the repository at this point in the history
[#176] Test accessibility for lockers page
  • Loading branch information
christinach authored Nov 13, 2024
2 parents 20518ff + b7aa6dc commit d818cb3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion spec/features/accessibility_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
require 'axe-rspec'

describe 'accessibility', :js do
let(:admin) { FactoryBot.create(:user, admin: true) }
let(:firestone) { FactoryBot.create(:building, name: 'Firestone Library', id: 1) }
let(:admin) { FactoryBot.create(:user, admin: true, building: firestone) }

before do
firestone
Expand Down Expand Up @@ -49,4 +49,16 @@
.according_to(:wcag2a, :wcag2aa, :wcag21a, :wcag21aa)
end
end

context 'when visiting lockers page' do
before do
sign_in admin
end

it 'complies with wcag' do
visit '/lockers'
expect(page).to be_axe_clean
.according_to(:wcag2a, :wcag2aa, :wcag21a, :wcag21aa)
end
end
end

0 comments on commit d818cb3

Please sign in to comment.