From 8f777b4d3821dba2d1676845773edabe5e375604 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Fri, 8 Oct 2021 10:26:14 +0100 Subject: [PATCH 1/2] Updates authentication_spec.rb into system spec --- spec/{features => system}/consumer/authentication_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename spec/{features => system}/consumer/authentication_spec.rb (99%) diff --git a/spec/features/consumer/authentication_spec.rb b/spec/system/consumer/authentication_spec.rb similarity index 99% rename from spec/features/consumer/authentication_spec.rb rename to spec/system/consumer/authentication_spec.rb index e79bcdd6cf..e4e0ab4c35 100644 --- a/spec/features/consumer/authentication_spec.rb +++ b/spec/system/consumer/authentication_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'spec_helper' +require 'system_helper' describe "Authentication", js: true do include AuthenticationHelper From a376c0b079f45c2aac6faa76444959fd8919873c Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Fri, 8 Oct 2021 10:28:02 +0100 Subject: [PATCH 2/2] Updates cookie manipulation syntax to be Ferrum compliant --- spec/system/consumer/authentication_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/system/consumer/authentication_spec.rb b/spec/system/consumer/authentication_spec.rb index e4e0ab4c35..142df9353a 100644 --- a/spec/system/consumer/authentication_spec.rb +++ b/spec/system/consumer/authentication_spec.rb @@ -205,7 +205,7 @@ describe "Authentication", js: true do end it "logs in successfully and uses the locale from cookies" do - page.driver.browser.manage.add_cookie(name: 'locale', value: 'es') + page.driver.set_cookie("locale", "es") fill_in_and_submit_login_form(user) expect_logged_in @@ -213,7 +213,7 @@ describe "Authentication", js: true do expect(page).to have_content I18n.t(:home_shop, locale: :es).upcase expect(user.reload.locale).to eq "es" - page.driver.browser.manage.delete_cookie('locale') + page.driver.remove_cookie("locale") end end end