Skip to content

Commit

Permalink
Switch order of accessibility tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vh8154 committed Nov 13, 2024
1 parent bfbc839 commit 268a370
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec/features/accessibility_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,28 @@
end
end

context 'when editing new locker application' do
context 'when visiting the sign in page' do
before do
sign_in admin
end

let(:locker_application) do
FactoryBot.create(:locker_application, complete: true, accessibility_needs: ['Keyed entry (rather than combination)', 'Another need'])
visit '/sign_in'
end

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

context 'when visiting the sign in page' do
context 'when editing new locker application' do
before do
visit '/sign_in'
sign_in admin
end

let(:locker_application) do
FactoryBot.create(:locker_application, complete: true, accessibility_needs: ['Keyed entry (rather than combination)', 'Another need'])
end

it 'complies with wcag' do
visit edit_locker_application_path(id: locker_application.id)
expect(page).to be_axe_clean
.according_to(:wcag2a, :wcag2aa, :wcag21a, :wcag21aa)
end
Expand Down

0 comments on commit 268a370

Please sign in to comment.