/
purchase_books.feature
72 lines (62 loc) · 2.71 KB
/
purchase_books.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Feature: Purchase Books
In order to read
An online shopper will need to purchase books
Background:
Given I am on the shopping page
@focus
Scenario: Verify cart with one book
When I purchase "Pragmatic Project Automation"
Then I should see "1" in the quantity for line 1
And I should see "Pragmatic Project Automation" in the description for line 1
And I should see "29.95" in the each for line 1
And I should see "29.95" in the total for line 1
And I should see "29.95" in the cart total
Scenario: verify cart with two books
When I purchase "Pragmatic Project Automation"
And I continue shopping
And I purchase "Pragmatic Project Automation"
Then I should see "2" in the quantity for line 1
And I should see "Pragmatic Project Automation" in the description for line 1
And I should see "29.95" in the each for line 1
And I should see "59.90" in the total for line 1
And I should see "59.90" in the cart total
Scenario: verify cart with two different books
When I purchase "Pragmatic Project Automation"
And I continue shopping
And I purchase "Pragmatic Version Control"
Then I should see "1" in the quantity for line 1
And I should see "Pragmatic Project Automation" in the description for line 1
And I should see "29.95" in the each for line 1
And I should see "29.95" in the total for line 1
And I should see "1" in the quantity for line 2
And I should see "Pragmatic Version Control" in the description for line 2
And I should see "28.50" in the each for line 2
And I should see "28.50" in the total for line 2
And I should see "58.45" in the cart total
Scenario: Purchase two books
When I purchase "Pragmatic Unit Testing (C#)"
And I continue shopping
And I purchase "Pragmatic Version Control"
And I checkout
And I enter "Cheezy" in the name field
And I enter "123 Main Street" in the address field
And I enter "cheezy@example.com" in the email field
And I select "Credit card" from the pay type dropdown
And I place my order
Then I should see "Thank you for your order"
Scenario: Our first high level scenario
When I purchase "Pragmatic Unit Testing (C#)"
And I checkout with
| name | address | email | pay_type |
| Cheezy | 123 Main Street | cheezy@example.com | Credit card |
Then I should see "Thank you for your order"
Scenario: Using some default data
When I purchase a book
And I checkout with
| pay_type |
| Credit card |
Then I should see "Thank you for your order"
Scenario: Using all default data
When I purchase a book
And I complete the order
Then I should see "Thank you for your order"