-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #353 from DFE-Digital/accessibility-tests-for-rema…
…ining-groups Accessibility tests for remaining groups
- Loading branch information
Showing
13 changed files
with
228 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
require "rails_helper" | ||
require "axe-rspec" | ||
|
||
RSpec.feature "Test assignment accessibility", driver: :headless_firefox, accessibility: true do | ||
let(:user) { create(:user, :team_leader) } | ||
let(:project) { create(:project) } | ||
|
||
before do | ||
mock_successful_api_responses(urn: 123456, ukprn: 10061021) | ||
sign_in_with_user(user) | ||
end | ||
|
||
scenario "test change team lead for project page" do | ||
visit project_assign_team_lead_path(project) | ||
|
||
expect(page).to have_content("Change team lead") | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
scenario "test change caseworker for project page" do | ||
visit project_assign_caseworker_path(project) | ||
|
||
expect(page).to have_content("Change caseworker") | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
scenario "test change regional delivery officer for project page" do | ||
visit project_assign_regional_delivery_officer_path(project) | ||
|
||
expect(page).to have_content("Change regional delivery officer") | ||
expect(page).to be_axe_clean | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require "rails_helper" | ||
require "axe-rspec" | ||
|
||
RSpec.feature "Test authentication accessibility", driver: :headless_firefox, accessibility: true do | ||
scenario "sign in page" do | ||
visit sign_in_path | ||
|
||
expect(page).to have_content("Sign in") | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
scenario "sign out page" do | ||
visit sign_out_path | ||
|
||
expect(page).to have_content("You have signed out") | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
scenario "authentication failed page" do | ||
visit auth_failure_path | ||
|
||
expect(page).to have_content("Authentication failed.") | ||
expect(page).to be_axe_clean | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
require "rails_helper" | ||
require "axe-rspec" | ||
|
||
RSpec.feature "Test contacts accessibility", driver: :headless_firefox, accessibility: true do | ||
let(:user) { create(:user, email: "[email protected]") } | ||
let(:project) { create(:project, caseworker: user) } | ||
|
||
before do | ||
mock_successful_api_responses(urn: 123456, ukprn: 10061021) | ||
sign_in_with_user(user) | ||
end | ||
|
||
scenario "show contacts page" do | ||
contact = create(:contact, project: project) | ||
visit project_contacts_path(project) | ||
|
||
expect(page).to have_content(contact.name) | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
scenario "new page" do | ||
visit new_project_contact_path(project) | ||
|
||
expect(page).to have_content("Add contact") | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
scenario "edit page" do | ||
contact = create(:contact, project: project) | ||
visit edit_project_contact_path(project, contact) | ||
|
||
expect(page).to have_content("Edit contact") | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
scenario "deleted page" do | ||
contact = create(:contact, project: project) | ||
visit project_contact_delete_path(project, contact) | ||
|
||
expect(page).to have_content(contact.name) | ||
expect(page).to be_axe_clean | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
require "rails_helper" | ||
require "axe-rspec" | ||
|
||
RSpec.feature "Test note accessibility", driver: :headless_firefox, accessibility: true do | ||
let(:user) { create(:user, email: "[email protected]") } | ||
let(:project) { create(:project, caseworker: user) } | ||
let(:section) { create(:section, project: project) } | ||
let(:task) { create(:task, section: section) } | ||
|
||
before do | ||
mock_successful_api_responses(urn: 123456, ukprn: 10061021) | ||
sign_in_with_user(user) | ||
end | ||
|
||
describe "Project level notes" do | ||
let!(:note) { create(:note, user: user, project: project) } | ||
scenario "show notes page" do | ||
visit project_notes_path(project) | ||
|
||
expect(page).to have_content(note.body) | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
scenario "new page" do | ||
visit new_project_note_path(project) | ||
|
||
expect(page).to have_content("Enter note") | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
scenario "edit page" do | ||
visit edit_project_note_path(project, note) | ||
|
||
expect(page).to have_content(note.body) | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
scenario "deleted page" do | ||
visit project_note_delete_path(project, note) | ||
|
||
expect(page).to have_content("Are you sure you want to delete this note?") | ||
expect(page).to be_axe_clean | ||
end | ||
end | ||
|
||
describe "Task notes" do | ||
let!(:task_note) { create(:note, project: project, task: task) } | ||
scenario "new page" do | ||
visit new_project_note_path(project, task) | ||
|
||
expect(page).to have_content("Enter note") | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
scenario "show page" do | ||
visit project_task_path(project, task) | ||
|
||
expect(page).to have_content(task_note.body) | ||
expect(page).to be_axe_clean | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require "rails_helper" | ||
require "axe-rspec" | ||
|
||
RSpec.feature "Test project information accessibility", driver: :headless_firefox, accessibility: true do | ||
let(:user) { create(:user, email: "[email protected]") } | ||
let(:project) { create(:project, caseworker: user) } | ||
|
||
before do | ||
mock_successful_api_responses(urn: 123456, ukprn: 10061021) | ||
sign_in_with_user(user) | ||
end | ||
|
||
scenario "project information page" do | ||
visit project_information_path(project) | ||
|
||
expect(page).to have_content("Project details") | ||
expect(page).to be_axe_clean | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
require "rails_helper" | ||
require "axe-rspec" | ||
|
||
RSpec.feature "Test tasks accessibility", driver: :headless_firefox, accessibility: true do | ||
let(:user) { create(:user, email: "[email protected]") } | ||
let(:project) { create(:project, caseworker: user) } | ||
|
||
before do | ||
mock_successful_api_responses(urn: 123456, ukprn: 10061021) | ||
sign_in_with_user(user) | ||
end | ||
|
||
scenario "show tasks page" do | ||
section = create(:section, project: project) | ||
task = create(:task, section: section) | ||
|
||
visit project_path(project) | ||
|
||
expect(page).to have_content(task.title) | ||
expect(page).to be_axe_clean | ||
end | ||
|
||
scenario "individual task page" do | ||
section = create(:section, project: project) | ||
task = create(:task, section: section) | ||
|
||
visit project_task_path(project, task) | ||
|
||
expect(page).to have_content(task.title) | ||
expect(page).to be_axe_clean | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters