-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
paying_with_paypal_during_checkout.feature
64 lines (58 loc) · 2.77 KB
/
paying_with_paypal_during_checkout.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
@paying_for_order
Feature: Paying with paypal during checkout
In order to buy products
As a Customer
I want to be able to pay with PayPal Express Checkout
Background:
Given the store operates on a single channel in "United States"
And there is a user "john@example.com" identified by "password123"
And the store has a payment method "PayPal" with a code "PAYPAL" and Paypal Express Checkout gateway
And the store has a product "PHP T-Shirt" priced at "$19.99"
And the store ships everywhere for free
And I am logged in as "john@example.com"
@ui
Scenario: Successfully authorize payment
Given I added product "PHP T-Shirt" to the cart
And I have proceeded selecting "PayPal" payment method
And the payment method "PayPal" requires authorization before capturing
When I confirm my order with paypal payment
And I sign in to PayPal and authorize successfully
Then I should be notified that my payment has been completed
And I should see the thank you page
And the latest order should have a payment with state "completed"
@ui
Scenario: Successful payment
Given I added product "PHP T-Shirt" to the cart
And I have proceeded selecting "PayPal" payment method
When I confirm my order with paypal payment
And I sign in to PayPal and pay successfully
Then I should be notified that my payment has been completed
And I should see the thank you page
@ui
Scenario: Cancelling the payment
Given I added product "PHP T-Shirt" to the cart
And I have proceeded selecting "PayPal" payment method
When I confirm my order with paypal payment
And I cancel my PayPal payment
Then I should be notified that my payment has been cancelled
And I should be able to pay again
@ui
Scenario: Retrying the payment with success
Given I added product "PHP T-Shirt" to the cart
And I have proceeded selecting "PayPal" payment method
And I have confirmed my order with paypal payment
But I have cancelled PayPal payment
When I try to pay again
And I sign in to PayPal and pay successfully
Then I should be notified that my payment has been completed
And I should see the thank you page
@ui
Scenario: Retrying the payment and failing
Given I added product "PHP T-Shirt" to the cart
And I have proceeded selecting "PayPal" payment method
And I have confirmed my order with paypal payment
But I have cancelled PayPal payment
When I try to pay again
And I cancel my PayPal payment
Then I should be notified that my payment has been cancelled
And I should be able to pay again