Feature: Changing table

  @javascript
  Scenario: Scanning a table not yet occupied and change to it
    Given there is an open supplier with a menu
    And there is a signed in user with an active order
    And the user is on the homepage
    And there is another table
    When the user scans a QR code of another not occupied table
    Then the user should see a popup asking the user if he would like to change table
    When the user indicates in the popup that he wants to change the table
    And I wait 1 second
    Then the user should see the supplier menu having the other table as base
    And the user list should have been moved to the other table

  @javascript
  Scenario: Scanning a table already occupied
    Given there is an open supplier with a menu
    And there is a signed in user with an active order
    And the user is on the homepage
    And there is another table with an active list of another user
    When the user scans a QR code of another occupied table
    Then the user should see a popup telling him that the table is already occupied
    And the user list should not have been moved to the other table
