Skip to content

Commit

Permalink
[#176] Test accessibility for lockers page
Browse files Browse the repository at this point in the history
  • Loading branch information
vh8154 committed Nov 13, 2024
1 parent 268a370 commit 24578ab
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 24578ab

Please sign in to comment.