diff --git a/spec/features/accessibility_spec.rb b/spec/features/accessibility_spec.rb index a25f405..5d9b494 100644 --- a/spec/features/accessibility_spec.rb +++ b/spec/features/accessibility_spec.rb @@ -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 @@ -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