# Feature: Remove bot from seat # As a user # I want to remove a bot from a sea feature 'Remove bot', type: :feature do before(:each) do @table = FactoryGirl.create :table visit table_path @table end # Scenario: Visitor can remove a bot from seat # Given I can edit the table # When I see the seat with a bot # Then I see a button to remove a bot scenario 'visitor can remove a bot from a seat' do @button = page.find_button('+ Bot', match: :first).click page.assert_selector('button', text: '+ Bot', count: 3) expect(page).to have_content "BotPlayer" @button = page.find_button('- Bot', match: :first).click expect(page).to have_content "Removed Bot" page.assert_selector('button', text: '+ Bot', count: 4) end end