mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
Merge pull request #8317 from filipefurtad0/fix_flaky_authentication_spec
Fix flaky consumer/authentication spec
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require 'system_helper'
|
||||
|
||||
describe "Authentication", js: true do
|
||||
include AuthenticationHelper
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user