ajout d'une bannière de dépréciation pour IE11
This commit is contained in:
parent
440f8d6b71
commit
ca74ae5a5e
3 changed files with 40 additions and 12 deletions
|
@ -6,5 +6,5 @@ Opera >= 40
|
|||
Safari >= 8
|
||||
iOS >= 8
|
||||
# Although IE 11 shows a deprecation banner, we still support the transpilation option.
|
||||
# IE 11 support may be removed starting from 01 / 06 / 2020.
|
||||
# IE 11 support will be removed on Jan. 31st, 2021.
|
||||
IE >= 11
|
||||
|
|
|
@ -2,6 +2,14 @@
|
|||
#outdated-browser-banner.site-banner
|
||||
.container
|
||||
.site-banner-icon ⚠️
|
||||
- if browser.ie?(11)
|
||||
.site-banner-text
|
||||
Internet Explorer 11 est un navigateur trop ancien. Nous cesserons de gérer son fonctionnement à partir du
|
||||
%strong
|
||||
31 janvier 2021.
|
||||
%br
|
||||
Merci de changer pour un navigateur plus récent avant cette date ; il peut être nécessaire de prendre contact avec un responsable informatique.
|
||||
- else
|
||||
.site-banner-text
|
||||
%strong
|
||||
#{browser.name} #{browser.version} est trop ancien pour utiliser demarches-simplifiees.fr.
|
||||
|
|
|
@ -1,29 +1,49 @@
|
|||
feature 'Outdated browsers support:' do
|
||||
context 'when the user browser is outdated' do
|
||||
before(:each) do
|
||||
ie_11_user_agent = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko'
|
||||
Capybara.page.driver.header('user-agent', ie_11_user_agent)
|
||||
ie_10_user_agent = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; InfoPath.3)'
|
||||
Capybara.page.driver.header('user-agent', ie_10_user_agent)
|
||||
end
|
||||
|
||||
scenario 'a banner is displayed' do
|
||||
visit new_user_session_path
|
||||
expect(page).to have_content('Internet Explorer 11 est trop ancien')
|
||||
expect(page).to have_content('Internet Explorer 10 est trop ancien')
|
||||
end
|
||||
|
||||
scenario 'the banner can be dismissed' do
|
||||
visit new_user_session_path
|
||||
expect(page).to have_content('Internet Explorer 11 est trop ancien')
|
||||
expect(page).to have_content('Internet Explorer 10 est trop ancien')
|
||||
|
||||
# The banner is hidden immediately
|
||||
within '#outdated-browser-banner' do
|
||||
click_on 'Ignorer'
|
||||
end
|
||||
expect(page).not_to have_content('Internet Explorer 11 est trop ancien')
|
||||
expect(page).not_to have_content('Internet Explorer 10 est trop ancien')
|
||||
expect(page).to have_current_path(new_user_session_path)
|
||||
|
||||
# The banner is hidden after a refresh
|
||||
page.refresh
|
||||
expect(page).not_to have_content('Internet Explorer 11 est trop ancien')
|
||||
expect(page).not_to have_content('Internet Explorer 10 est trop ancien')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the user browser is about to be outdated' do
|
||||
before(:each) do
|
||||
ie_11_user_agent = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko'
|
||||
Capybara.page.driver.header('user-agent', ie_11_user_agent)
|
||||
end
|
||||
|
||||
scenario 'IE11 gets a dedicated depreciation banner for update before jan 31st 2021' do
|
||||
visit new_user_session_path
|
||||
expect(page).to have_content('31 janvier 2021')
|
||||
expect(page).to have_content('Internet Explorer 11 est un navigateur trop ancien')
|
||||
|
||||
within '#outdated-browser-banner' do
|
||||
click_on 'Ignorer'
|
||||
end
|
||||
|
||||
page.refresh
|
||||
expect(page).not_to have_content('Internet Explorer 11 est un navigateur trop ancien')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue