Skip to content

Instantly share code, notes, and snippets.

@up1
Last active August 29, 2015 14:27
Show Gist options
  • Save up1/30748b33a317c17d342b to your computer and use it in GitHub Desktop.
Save up1/30748b33a317c17d342b to your computer and use it in GitHub Desktop.
Improve your test 01
Scenario: Reject Pre-paid account purchase
Given a user with "500 THB" in a pre-paid account
When the user attemp to buy a "700 THB" ticket
Then the purchase is rejected
And the user is left with "500 THB" in the account
Scenario: Pre-paid account purchase
Given a user with "1000 THB" in a pre-paid account
When the user attemp to buy a "700 THB" ticket
Then the purchase is approved
And the user is left with "300 THB" in the account
Scenario: Basic flow
Given the user mike log in
And the user click on "Deposit"
And the page reload
Then the page is "Deposit"
And the user click on "1000 THB"
And the page reload
Then the page is "Card Payment"
When the user enter a valid card number
And the user click on "Submit"
And the payment id approved
And the page reload
Then the page is "Account"
And the account field show "1000 THB"
And the user click on "Find Tickets"
and the page reload
Then the page is "Tickets"
And the price is "700 THB"
And the user click on "Buy Tickets"
Then the purchase is approved
And the page reload
And a ticket confirmation number is displayed
And the account field show "300 THB"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment