Merge pull request #3076 from microweb10/3075-flaky-spec

Fix flaky spec: Each user has a different and consistent random proposals order
This commit is contained in:
Julian Nicolas Herrero
2018-12-03 15:49:54 +01:00
committed by GitHub
2 changed files with 3 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ feature 'Legislation Proposals' do
end
end
scenario 'Each user as a different and consistent random proposals order', :js do
scenario 'Each user has a different and consistent random proposals order', :js do
create_list(:legislation_proposal, 10, process: process)
in_browser(:one) do

View File

@@ -1,8 +1,3 @@
def in_browser(name)
old_session = Capybara.session_name
Capybara.session_name = name
yield
Capybara.session_name = old_session
def in_browser(name, &block)
Capybara.using_session(name, &block)
end