Fix test navigation

This commit is contained in:
Jesse C. Fisher 2021-11-03 06:41:15 -07:00
parent 6a58d32ffd
commit 5bdd7217c7

View File

@ -81,30 +81,22 @@ feature 'Seats', :devise, js: true do
end
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
expect(page).to have_content @user.email
end
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
expect(page).to have_content @user.email
expect(page.text.scan(@user.email).count).to eq 1
end
scenario 'user can leave the current game' do
expect(page).to have_content "Sit"
click_button 'Sit', match: :first
expect(page).to have_content @user.email
expect(page.text.scan(@user.email).count).to eq 1
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
end