Merge pull request #6394 from betagouv/accessibilite
Remplacement de la gem dépréciée `axe-matchers` par `axe-core-spec` (#6394)
This commit is contained in:
commit
d0300d684c
4 changed files with 34 additions and 26 deletions
2
Gemfile
2
Gemfile
|
@ -84,6 +84,7 @@ gem 'zipline'
|
||||||
gem 'zxcvbn-ruby', require: 'zxcvbn'
|
gem 'zxcvbn-ruby', require: 'zxcvbn'
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
|
gem 'axe-core-rspec' # accessibility rspec matchers
|
||||||
gem 'capybara' # Integration testing
|
gem 'capybara' # Integration testing
|
||||||
gem 'capybara-email' # Access emails during integration tests
|
gem 'capybara-email' # Access emails during integration tests
|
||||||
gem 'capybara-screenshot' # Save a dump of the page when an integration test fails
|
gem 'capybara-screenshot' # Save a dump of the page when an integration test fails
|
||||||
|
@ -114,7 +115,6 @@ group :development do
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
gem 'axe-matchers' # accessibility rspec matchers
|
|
||||||
gem 'graphql-schema_comparator'
|
gem 'graphql-schema_comparator'
|
||||||
gem 'mina', git: 'https://github.com/mina-deploy/mina.git', require: false # Deploy
|
gem 'mina', git: 'https://github.com/mina-deploy/mina.git', require: false # Deploy
|
||||||
gem 'pry-byebug' # Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
gem 'pry-byebug' # Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||||
|
|
24
Gemfile.lock
24
Gemfile.lock
|
@ -108,9 +108,16 @@ GEM
|
||||||
attr_encrypted (3.1.0)
|
attr_encrypted (3.1.0)
|
||||||
encryptor (~> 3.0.0)
|
encryptor (~> 3.0.0)
|
||||||
attr_required (1.0.1)
|
attr_required (1.0.1)
|
||||||
axe-matchers (2.6.1)
|
axe-core-api (4.2.1)
|
||||||
dumb_delegator (~> 0.8)
|
capybara
|
||||||
virtus (~> 1.0)
|
dumb_delegator
|
||||||
|
selenium-webdriver
|
||||||
|
virtus
|
||||||
|
watir
|
||||||
|
axe-core-rspec (4.2.1)
|
||||||
|
axe-core-api
|
||||||
|
dumb_delegator
|
||||||
|
virtus
|
||||||
axiom-types (0.1.1)
|
axiom-types (0.1.1)
|
||||||
descendants_tracker (~> 0.0.4)
|
descendants_tracker (~> 0.0.4)
|
||||||
ice_nine (~> 0.11.0)
|
ice_nine (~> 0.11.0)
|
||||||
|
@ -230,11 +237,10 @@ GEM
|
||||||
dotenv (= 2.7.6)
|
dotenv (= 2.7.6)
|
||||||
railties (>= 3.2)
|
railties (>= 3.2)
|
||||||
dry-inflector (0.2.0)
|
dry-inflector (0.2.0)
|
||||||
dumb_delegator (0.8.1)
|
dumb_delegator (1.0.0)
|
||||||
ecma-re-validator (0.3.0)
|
ecma-re-validator (0.3.0)
|
||||||
regexp_parser (~> 2.0)
|
regexp_parser (~> 2.0)
|
||||||
encryptor (3.0.0)
|
encryptor (3.0.0)
|
||||||
equalizer (0.0.11)
|
|
||||||
erubi (1.10.0)
|
erubi (1.10.0)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
et-orbi (1.2.4)
|
et-orbi (1.2.4)
|
||||||
|
@ -731,13 +737,15 @@ GEM
|
||||||
activemodel (>= 3.0.0)
|
activemodel (>= 3.0.0)
|
||||||
public_suffix
|
public_suffix
|
||||||
vcr (6.0.0)
|
vcr (6.0.0)
|
||||||
virtus (1.0.5)
|
virtus (2.0.0)
|
||||||
axiom-types (~> 0.1)
|
axiom-types (~> 0.1)
|
||||||
coercible (~> 1.0)
|
coercible (~> 1.0)
|
||||||
descendants_tracker (~> 0.0, >= 0.0.3)
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
||||||
equalizer (~> 0.0, >= 0.0.9)
|
|
||||||
warden (1.2.9)
|
warden (1.2.9)
|
||||||
rack (>= 2.0.9)
|
rack (>= 2.0.9)
|
||||||
|
watir (6.19.1)
|
||||||
|
regexp_parser (>= 1.2, < 3)
|
||||||
|
selenium-webdriver (>= 3.142.7)
|
||||||
web-console (4.1.0)
|
web-console (4.1.0)
|
||||||
actionview (>= 6.0.0)
|
actionview (>= 6.0.0)
|
||||||
activemodel (>= 6.0.0)
|
activemodel (>= 6.0.0)
|
||||||
|
@ -785,7 +793,7 @@ DEPENDENCIES
|
||||||
after_party
|
after_party
|
||||||
anchored
|
anchored
|
||||||
annotate
|
annotate
|
||||||
axe-matchers
|
axe-core-rspec
|
||||||
bcrypt
|
bcrypt
|
||||||
bootsnap (>= 1.4.4)
|
bootsnap (>= 1.4.4)
|
||||||
brakeman
|
brakeman
|
||||||
|
|
|
@ -10,12 +10,12 @@ feature 'wcag rules for usager', js: true do
|
||||||
context 'pages without the need to be logged in' do
|
context 'pages without the need to be logged in' do
|
||||||
scenario 'homepage' do
|
scenario 'homepage' do
|
||||||
visit root_path
|
visit root_path
|
||||||
expect(page).to be_accessible
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'sign_up page' do
|
scenario 'sign_up page' do
|
||||||
visit new_user_registration_path
|
visit new_user_registration_path
|
||||||
expect(page).to be_accessible
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'account confirmation page' do
|
scenario 'account confirmation page' do
|
||||||
|
@ -26,23 +26,23 @@ feature 'wcag rules for usager', js: true do
|
||||||
|
|
||||||
perform_enqueued_jobs do
|
perform_enqueued_jobs do
|
||||||
click_button 'Créer un compte'
|
click_button 'Créer un compte'
|
||||||
expect(page).to be_accessible
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'sign_in page' do
|
scenario 'sign_in page' do
|
||||||
visit new_user_session_path
|
visit new_user_session_path
|
||||||
expect(page).to be_accessible.excluding '#user_email'
|
expect(page).to be_axe_clean.excluding '#user_email'
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'contact page' do
|
scenario 'contact page' do
|
||||||
visit contact_path
|
visit contact_path
|
||||||
expect(page).to be_accessible
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'commencer page' do
|
scenario 'commencer page' do
|
||||||
visit commencer_path(path: procedure.reload.path)
|
visit commencer_path(path: procedure.reload.path)
|
||||||
expect(page).to be_accessible
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ feature 'wcag rules for usager', js: true do
|
||||||
|
|
||||||
scenario 'écran identité usager' do
|
scenario 'écran identité usager' do
|
||||||
click_on 'Commencer la démarche'
|
click_on 'Commencer la démarche'
|
||||||
expect(page).to be_accessible
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
|
||||||
# with no surprise, there's a lot of work on this one
|
# with no surprise, there's a lot of work on this one
|
||||||
|
@ -66,7 +66,7 @@ feature '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_accessible.skipping :'aria-input-field-name'
|
expect(page).to be_axe_clean.skipping :'aria-input-field-name'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ feature '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_accessible.skipping :label
|
expect(page).to be_axe_clean.skipping :label
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -92,37 +92,37 @@ feature 'wcag rules for usager', js: true do
|
||||||
|
|
||||||
scenario 'liste des dossiers' do
|
scenario 'liste des dossiers' do
|
||||||
visit dossiers_path
|
visit dossiers_path
|
||||||
expect(page).to be_accessible
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'dossier' do
|
scenario 'dossier' do
|
||||||
visit dossier_path(dossier)
|
visit dossier_path(dossier)
|
||||||
expect(page).to be_accessible.skipping :'aria-input-field-name'
|
expect(page).to be_axe_clean.skipping :'aria-input-field-name'
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'merci' do
|
scenario 'merci' do
|
||||||
visit merci_dossier_path(dossier)
|
visit merci_dossier_path(dossier)
|
||||||
expect(page).to be_accessible
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'demande' do
|
scenario 'demande' do
|
||||||
visit demande_dossier_path(dossier)
|
visit demande_dossier_path(dossier)
|
||||||
expect(page).to be_accessible
|
expect(page).to be_axe_clean
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'messagerie' do
|
scenario 'messagerie' do
|
||||||
visit messagerie_dossier_path(dossier)
|
visit messagerie_dossier_path(dossier)
|
||||||
expect(page).to be_accessible
|
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_accessible.skipping :'aria-input-field-name'
|
expect(page).to be_axe_clean.skipping :'aria-input-field-name'
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'brouillon' do
|
scenario 'brouillon' do
|
||||||
visit brouillon_dossier_path(dossier)
|
visit brouillon_dossier_path(dossier)
|
||||||
expect(page).to be_accessible.skipping :'aria-input-field-name'
|
expect(page).to be_axe_clean.skipping :'aria-input-field-name'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,7 +10,7 @@ abort("The Rails environment is running in production mode!") if Rails.env.produ
|
||||||
require 'rspec/rails'
|
require 'rspec/rails'
|
||||||
# Add additional requires below this line. Rails is not loaded until this point!
|
# Add additional requires below this line. Rails is not loaded until this point!
|
||||||
|
|
||||||
require 'axe/rspec'
|
require 'axe-rspec'
|
||||||
require 'devise'
|
require 'devise'
|
||||||
require 'shoulda-matchers'
|
require 'shoulda-matchers'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue