Fix up test failures in Chrome & Firefox

This commit is contained in:
James Mason 2018-10-25 16:16:56 -07:00
parent b72bb8a0ed
commit 1b9a12746d
29 changed files with 145 additions and 78 deletions

View file

@ -20,6 +20,7 @@ feature Openid do
within('#openidlinks') do
click_link 'omniauth-google'
end
page.find('#flash')
expect(flash).to eq('test-1@example.com signed in successfully with google')
expect(Openid.count).to eq(expected_count_openid)
expect(User.count).to eq(expected_count_user)
@ -35,6 +36,7 @@ feature Openid do
within('#openidlinks') do
click_link 'omniauth-google'
end
page.find('#flash')
expect(flash).to eq('test-participant-1@example.com signed in successfully with google')
expect(Openid.count).to eq(expected_count_openid)
expect(User.count).to eq(expected_count_user)
@ -47,7 +49,7 @@ feature Openid do
within('#openidlinks') do
click_link 'omniauth-google'
end
page.find('#flash')
expect(flash).to eq('Could not authenticate you from Google because "Invalid credentials".')
end
@ -65,6 +67,7 @@ feature Openid do
within('#openidlinks') do
click_link 'omniauth-google'
end
page.find('#flash')
expect(flash).to eq('test-participant-1@example.com signed in successfully with google')
expect(Openid.count).to eq(expected_count_openid)
expect(User.count).to eq(expected_count_user)
@ -82,7 +85,9 @@ feature Openid do
within('#openidlinks') do
click_link 'omniauth-google'
end
page.find('#flash')
expect(flash).to eq('test-participant-1@example.com signed in successfully with google')
page.find('#flash .close').click
expect(Openid.count).to eq(expected_count_openid)
expect(User.count).to eq(expected_count_user)
@ -95,7 +100,9 @@ feature Openid do
within('#openidlinks') do
click_link 'omniauth-google'
end
page.find('#flash')
expect(flash).to eq('test-participant-1@example.com signed in successfully with google')
page.find('#flash .close').click
expect(Openid.count).to eq(expected_count_openid)
expect(User.count).to eq(expected_count_user)
expect(Openid.where(email: 'test-participant-1@example.com').first.nil?).to eq(false)
@ -111,6 +118,7 @@ feature Openid do
within('#openidlinks') do
click_link 'omniauth-facebook'
end
page.find('#flash')
expect(flash).to eq('test-participant-1@example.com signed in successfully with facebook')
expect(Openid.count).to eq(expected_count_openid)
expect(User.count).to eq(expected_count_user)
@ -136,6 +144,7 @@ feature Openid do
within('#openidlinks') do
click_link "omniauth-#{provider}"
end
page.find('#flash')
expect(flash).to eq("user-#{provider}@example.com signed in successfully with #{provider}")
expect(Openid.count).to eq(expected_count_openid)
expect(User.count).to eq(expected_count_user)