-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Feature: Book new Cargo | ||
In order to overbook a Voyage | ||
As a booking manager | ||
I need to be able to book a Cargo that has a 10 percent larger size than the capacity of the Voyage | ||
|
||
@javascript | ||
Scenario: Add a Cargo | ||
Given I am on "application/cargo/add" | ||
When I fill in "size" with "110" | ||
And I click the submit button | ||
Then the url should match "application/cargo/index" | ||
|
||
@javascript | ||
Scenario: Add a Voyage with low capacity | ||
Given I am on "application/voyage/add" | ||
When I fill in "voyage_number" with "SHIP123" | ||
And I fill in "name" with "Low Voyage" | ||
And I fill in "capacity" with "100" | ||
And I click the submit button | ||
Then the url should match "application/voyage/index" | ||
|
||
@javascript | ||
Scenario: Book Cargo on Voyage even though Voyage has not enough free capacity | ||
Given I am on "application/cargo/index" | ||
When I click on first item in the list "cargo-list" | ||
And I wait until I am on page "application/cargo/show" | ||
And I select "SHIP123" from "voyage_number" | ||
And I click the submit button | ||
Then the url should match "application/booking/booking" | ||
And the response should contain "Cargo was successfully booked" |