Fix test navigation
This commit is contained in:
parent
2cc50d88ba
commit
97b42e31cb
@ -81,30 +81,22 @@ feature 'Seats', :devise, js: true do
|
|||||||
end
|
end
|
||||||
|
|
||||||
scenario 'user can sit at the table' do
|
scenario 'user can sit at the table' do
|
||||||
#TODO: Fix race condition
|
|
||||||
sleep 3
|
|
||||||
expect(page).to have_content "Sit"
|
|
||||||
click_button 'Sit', match: :first
|
click_button 'Sit', match: :first
|
||||||
expect(page).to have_content @user.email
|
expect(page).to have_content @user.email
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'user can join the current game' do
|
scenario 'user can join the current game' do
|
||||||
#TODO: Fix race condition
|
|
||||||
sleep 3
|
|
||||||
expect(page).to have_content "Sit"
|
|
||||||
click_button 'Sit', match: :first
|
click_button 'Sit', match: :first
|
||||||
expect(page).to have_content @user.email
|
expect(page).to have_content @user.email
|
||||||
expect(page.text.scan(@user.email).count).to eq 1
|
expect(page.text.scan(@user.email).count).to eq 1
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'user can leave the current game' do
|
scenario 'user can leave the current game' do
|
||||||
expect(page).to have_content "Sit"
|
|
||||||
click_button 'Sit', match: :first
|
click_button 'Sit', match: :first
|
||||||
expect(page).to have_content @user.email
|
expect(page).to have_content @user.email
|
||||||
expect(page.text.scan(@user.email).count).to eq 1
|
expect(page.text.scan(@user.email).count).to eq 1
|
||||||
click_button 'Stand', match: :first
|
click_button 'Stand', match: :first
|
||||||
expect(page).to have_content "Sit"
|
# sleep 1
|
||||||
sleep 1
|
|
||||||
expect(page.text.scan(@user.email).count).to eq 0
|
expect(page.text.scan(@user.email).count).to eq 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user