Created
May 10, 2020 20:19
-
-
Save ramonrails/f8029b988ec25cac49966ca51c03bde4 to your computer and use it in GitHub Desktop.
cucumber BDD example: scenario outline with examples data table
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
Scenario Outline: Shipping options | |
Given the following shipping_options: | |
| description | price | | |
| UPS Overnight shipping | 60 | | |
| UPS 2 day shipping | 28 | | |
| UPS Ground Shipping | 16 | | |
And "default" coupon_code for "direct_to_consumer" group has "<_ship>" shipping | |
When I go to the online store | |
And I choose "product_complete" | |
And I choose "S2228" | |
And I fill the shipping details for online store | |
And I fill the credit card details for online store | |
And I check "order_bill_address_same" | |
And I choose "UPS 2 day shipping" | |
And I press "Continue" | |
Then page content should have "<_applicable_shipping>" | |
When I press "Place Order" | |
Then page content should have "Thank you for your order" | |
And the payment gateway response should have 1 log | |
And 1 email to "[email protected]" with subject "Please activate your new mydemoclient account" should be sent for delivery | |
And shipping values get copied from <_where> for last order | |
Examples: | |
| _ship | _where | _applicable_shipping | | |
| | shipping option | UPS 2 day shipping | | |
| 9 | coupon code | applies from coupon code | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment