Fix tests

This commit is contained in:
Jesse C. Fisher 2021-09-19 00:26:45 -07:00
parent 5358752e26
commit 18612e2efc

View File

@ -32,8 +32,7 @@ feature 'Play a hand', type: :feature, js: true do
# Play the highest card
@card_to_play = @player.inventory.last
find_card(@card_to_play).click
#click_button 'Play Hand'
click_button "play_hand_button_#{@player.id}"
click_button 'Play Hand'
# No play to beat, because play was invalid
expect(@game.play_to_beat).to eq(nil)
@ -49,9 +48,8 @@ feature 'Play a hand', type: :feature, js: true do
# Then I see the hand to beat is this play
scenario 'first play contains lowest card' do
@card_to_play = @game.lowest_card
find_card(@card_to_play).click
#click_button 'Play Hand'
click_button "play_hand_button_#{@player.id}"
find_card(@card_to_play).click(x: 0, y: 0)
click_button 'Play Hand'
expect(cards_to_beat).to eq @game.lowest_card.to_s
end