Feature: Supplier section view @javascript Scenario: the section view displays tables and keeps their status information Given there is an active list and order And I am signed in as supplier When I visit the supplier section path Then the section table should be positioned in the section And the section table should be marked as having an active order And the section table should be marked as occupied And the section table should not be marked as in need of help When the order gets marked as being in process Then the section table should still be marked as having an active order When the list is marked as in need of help # waiting here only needed in old style implementation And I wait 1 second Then the section table should be marked as in need of help When I click on section table as a supplier Then A popup having table options should appear in supplier section area When I click on the mark list as helped in the section table popup as supplier And I wait 1 second Then the section table should not be marked as in need of help And the section table popup should no longer have the mark list as helped button When the list is marked as in need of payment Then the section table should be marked as in need of payment And I wait 1 seconds # Reopen the table menu When I click on section table as a supplier And I click on the close list button in the section table table popup And confirm the supplier close list modal And I wait 1 second Then the section table should not have any active list markings anymore And the list should be marked as closed @javascript Scenario: Going to edit mode and change section properties Given there is an active list and order And there are 2 supplier sections And the last supplier section has a table with known coordinates And I am signed in as supplier When I visit the supplier last section path And I click the supplier section edit mode button And I fill in the supplier edit section form with new values Then the last section tab header should have the newly filled in name When I click the supplier section normal mode button Then the supplier last section properties should be updated to the new values @javascript Scenario: A new order is created when the view is already loaded Given there is a confirmed and open supplier And there is a table in the section And there is a product And I am signed in as supplier When I visit the supplier section path And A new order is placed And I wait 1 second Then the table should be marked as occupied and having an active order When the supplier clicks on the table having the new list in the section view Then the supplier table actions of the new list should be visible @javascript Scenario: List moves to another table when section view is already loaded Given there is an active list and order And there is another table in the section And I am signed in as supplier And I visit the supplier section path Then the list should be linked to the original table in the section view When the list changes to another table Then the list should be linked to the other table in the section view And the section table should not have any active list markings anymore # capybara-webkit 1.1.0 drag to is not yet supported it seems @javascript @broken Scenario: Dragging a table to another section Given there is an active list and order And there are 2 supplier sections And the last supplier section has a table with known coordinates And I am signed in as supplier When I visit the supplier last section path And I click the supplier section edit mode button And I drag the table from the last section to the first section tab header And I wait 1 second Then the supplier table should have been linked to the first section