From 745b00366f7e3289ba0e48fe5479f47d4e2bb05f Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Tue, 28 Jan 2020 11:28:12 +0100 Subject: [PATCH] Revert "app: hide IE11 deprecation banner during the strike" This reverts commit c2882b6cc356ecfb74a86072916539c2a187acb8. --- config/initializers/browser.rb | 1 - spec/features/outdated_browser_spec.rb | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/config/initializers/browser.rb b/config/initializers/browser.rb index 798e342ed..f9d22d40b 100644 --- a/config/initializers/browser.rb +++ b/config/initializers/browser.rb @@ -2,7 +2,6 @@ Browser.modern_rules.clear Browser.modern_rules << -> b { b.chrome? && b.version.to_i >= 50 && !b.platform.ios? } Browser.modern_rules << -> b { b.edge? && b.version.to_i >= 14 && !b.compatibility_view? } -Browser.modern_rules << -> b { b.ie? && b.version.to_i >= 11 && !b.compatibility_view? } Browser.modern_rules << -> b { b.firefox? && b.version.to_i >= 50 && !b.platform.ios? } Browser.modern_rules << -> b { b.opera? && b.version.to_i >= 40 } Browser.modern_rules << -> b { b.safari? && b.version.to_i >= 8 } diff --git a/spec/features/outdated_browser_spec.rb b/spec/features/outdated_browser_spec.rb index 57fa4815a..e6cb28efb 100644 --- a/spec/features/outdated_browser_spec.rb +++ b/spec/features/outdated_browser_spec.rb @@ -3,29 +3,29 @@ require 'spec_helper' feature 'Outdated browsers support:' do context 'when the user browser is outdated' do before(:each) do - ie_10_user_agent = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)' - Capybara.page.driver.header('user-agent', ie_10_user_agent) + 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 'a banner is displayed' do visit new_user_session_path - expect(page).to have_content('Internet Explorer 10 est trop ancien') + expect(page).to have_content('Internet Explorer 11 est trop ancien') end scenario 'the banner can be dismissed' do visit new_user_session_path - expect(page).to have_content('Internet Explorer 10 est trop ancien') + expect(page).to have_content('Internet Explorer 11 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 10 est trop ancien') + expect(page).not_to have_content('Internet Explorer 11 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 10 est trop ancien') + expect(page).not_to have_content('Internet Explorer 11 est trop ancien') end end end