Skip to content

Commit

Permalink
Add featue test overbook_voyage
Browse files Browse the repository at this point in the history
  • Loading branch information
codeliner committed Nov 26, 2013
1 parent 0654cd8 commit 80259a0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions features/overbook_voyage.feature
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"

0 comments on commit 80259a0

Please sign in to comment.