diff --git a/test/integration/setup_test.rb b/test/integration/setup_test.rb index d511bbb9..79ae3792 100644 --- a/test/integration/setup_test.rb +++ b/test/integration/setup_test.rb @@ -24,7 +24,7 @@ class SetupTest < ActionDispatch::IntegrationTest assert_text "User doesn't exist" fill_in 'Email', with: 'joe@mail.com' within('form') { click_on 'Sign in' } - assert_text 'Dashboard' + Capybara.using_wait_time(5) { assert_text 'Dashboard' } assert has_link?('documents') using_session 'bob' do add_virtual_authenticator diff --git a/test/test_helper.rb b/test/test_helper.rb index c835f9b1..25fa98cb 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -80,6 +80,10 @@ class ActionDispatch::IntegrationTest include Capybara::DSL include Capybara::Screenshot::MiniTestPlugin + setup do + FactoryBot.rewind_sequences # in order to have stable screenshots + end + def login collaborator = create :collaborator page.set_rack_session account_id: collaborator.account_id, collaborator_id: collaborator.id, user_id: collaborator.user_id