Merge pull request #7863 from mfo/US/stress-wcag-tests
Us/stress wcag tests
This commit is contained in:
commit
6d68c581af
4 changed files with 40 additions and 19 deletions
|
@ -259,11 +259,6 @@
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
|
||||||
color: $dark-grey;
|
|
||||||
background-image: none; // remove DSFR underline
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make child links fill the whole clickable area
|
// Make child links fill the whole clickable area
|
||||||
> a {
|
> a {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -13,10 +13,6 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
thead a {
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
background-image: none; // remove DSFR underline
|
background-image: none; // remove DSFR underline
|
||||||
}
|
}
|
||||||
|
@ -28,7 +24,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell-link {
|
.cell-link {
|
||||||
color: $black;
|
|
||||||
// In order to have identical height in the table header and the table rows,
|
// In order to have identical height in the table header and the table rows,
|
||||||
// we compensate for the height difference between the biggest element of the header
|
// we compensate for the height difference between the biggest element of the header
|
||||||
// (the Personnaliser button, 38px) and the biggest cell-link element of the rows (the label, 28px)
|
// (the Personnaliser button, 38px) and the biggest cell-link element of the rows (the label, 28px)
|
||||||
|
|
|
@ -40,6 +40,16 @@ export class MenuButtonController extends ApplicationController {
|
||||||
for (const menuItem of this.menuTarget.querySelectorAll('a')) {
|
for (const menuItem of this.menuTarget.querySelectorAll('a')) {
|
||||||
menuItem.setAttribute('role', 'menuitem');
|
menuItem.setAttribute('role', 'menuitem');
|
||||||
}
|
}
|
||||||
|
for (const dropdownItems of this.menuTarget.querySelectorAll(
|
||||||
|
'.dropdown-items'
|
||||||
|
)) {
|
||||||
|
dropdownItems.setAttribute('role', 'none');
|
||||||
|
}
|
||||||
|
for (const dropdownItems of this.menuTarget.querySelectorAll(
|
||||||
|
'.dropdown-items > li'
|
||||||
|
)) {
|
||||||
|
dropdownItems.setAttribute('role', 'none');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.on('click', (event) => {
|
this.on('click', (event) => {
|
||||||
|
@ -68,7 +78,7 @@ export class MenuButtonController extends ApplicationController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private open(focusMenuItem: 'first' | 'last' = 'first') {
|
private open(focusMenuItem: 'first' | 'last' = 'first') {
|
||||||
this.buttonTarget.setAttribute('aria-expanded', '');
|
this.buttonTarget.setAttribute('aria-expanded', 'true');
|
||||||
this.menuTarget.parentElement?.classList.add('open');
|
this.menuTarget.parentElement?.classList.add('open');
|
||||||
this.menuTarget.focus();
|
this.menuTarget.focus();
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,12 @@ describe 'wcag rules for usager', js: true do
|
||||||
visit commencer_path(path: procedure.reload.path)
|
visit commencer_path(path: procedure.reload.path)
|
||||||
expect(page).to be_axe_clean
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
scenario 'commencer page, help dropdown' do
|
||||||
|
visit commencer_path(path: procedure.reload.path)
|
||||||
|
|
||||||
|
page.find("#help-menu_button").click
|
||||||
|
expect(page).to be_axe_clean
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "logged in, depot d'un dossier as individual" do
|
context "logged in, depot d'un dossier as individual" do
|
||||||
|
@ -66,7 +72,7 @@ describe 'wcag rules for usager', js: true do
|
||||||
fill_in('individual_nom', with: 'nom')
|
fill_in('individual_nom', with: 'nom')
|
||||||
click_on 'Continuer'
|
click_on 'Continuer'
|
||||||
|
|
||||||
expect(page).to be_axe_clean.skipping :'aria-input-field-name'
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -80,24 +86,37 @@ describe 'wcag rules for usager', js: true do
|
||||||
|
|
||||||
scenario "écran identification de l'entreprise" do
|
scenario "écran identification de l'entreprise" do
|
||||||
click_on 'Commencer la démarche'
|
click_on 'Commencer la démarche'
|
||||||
expect(page).to be_axe_clean.skipping :label
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "logged in, avec des dossiers dossiers déposés" do
|
context "logged in, avec des dossiers déposés" do
|
||||||
let(:dossier) { create(:dossier, procedure: procedure, user: litteraire_user) }
|
let(:dossier) { create(:dossier, procedure: procedure, user: litteraire_user) }
|
||||||
before do
|
before do
|
||||||
login_as litteraire_user, scope: :user
|
login_as litteraire_user, scope: :user
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'liste des dossiers' do
|
scenario 'liste des dossiers sans dossiers' do
|
||||||
visit dossiers_path
|
visit dossiers_path
|
||||||
expect(page).to be_axe_clean
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scenario 'liste des dossiers avec des dossiers' do
|
||||||
|
dossier
|
||||||
|
visit dossiers_path
|
||||||
|
expect(page).to be_axe_clean
|
||||||
|
end
|
||||||
|
|
||||||
|
scenario 'liste des dossiers et actions sur le dossier' do
|
||||||
|
dossier
|
||||||
|
visit dossiers_path
|
||||||
|
page.find("#actions_menu_dossier_#{dossier.id}_button").click
|
||||||
|
expect(page).to be_axe_clean
|
||||||
|
end
|
||||||
|
|
||||||
scenario 'dossier' do
|
scenario 'dossier' do
|
||||||
visit dossier_path(dossier)
|
visit dossier_path(dossier)
|
||||||
expect(page).to be_axe_clean.skipping :'aria-input-field-name'
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'merci' do
|
scenario 'merci' do
|
||||||
|
@ -110,19 +129,21 @@ describe 'wcag rules for usager', js: true do
|
||||||
expect(page).to be_axe_clean
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'messagerie' do
|
scenario 'messagerie avec des messages' do
|
||||||
|
create(:commentaire, dossier: dossier, instructeur: procedure.instructeurs.first, body: 'hello')
|
||||||
|
create(:commentaire, dossier: dossier, email: dossier.user.email, body: 'hello')
|
||||||
visit messagerie_dossier_path(dossier)
|
visit messagerie_dossier_path(dossier)
|
||||||
expect(page).to be_axe_clean
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'modifier' do
|
scenario 'modifier' do
|
||||||
visit modifier_dossier_path(dossier)
|
visit modifier_dossier_path(dossier)
|
||||||
expect(page).to be_axe_clean.skipping :'aria-input-field-name'
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'brouillon' do
|
scenario 'brouillon' do
|
||||||
visit brouillon_dossier_path(dossier)
|
visit brouillon_dossier_path(dossier)
|
||||||
expect(page).to be_axe_clean.skipping :'aria-input-field-name'
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue