1 | <?php |
||
14 | final class ShippingContext implements Context |
||
15 | { |
||
16 | /** |
||
17 | * @var SelectShippingPageInterface |
||
18 | */ |
||
19 | private $selectShippingPage; |
||
20 | |||
21 | /** |
||
22 | * @var SelectPaymentPageInterface |
||
23 | */ |
||
24 | private $selectPaymentPage; |
||
25 | |||
26 | /** |
||
27 | * @var CompletePageInterface |
||
28 | */ |
||
29 | private $completePage; |
||
30 | |||
31 | /** |
||
32 | * @param SelectShippingPageInterface $selectShippingPage |
||
33 | * @param SelectPaymentPageInterface $selectPaymentPage |
||
34 | * @param CompletePageInterface $completePage |
||
35 | */ |
||
36 | public function __construct( |
||
45 | |||
46 | /** |
||
47 | * @Given I have proceeded selecting :shippingMethodName shipping method |
||
48 | */ |
||
49 | public function iHaveProceededSelectingShippingMethod($shippingMethodName) |
||
54 | |||
55 | /** |
||
56 | * @When I try to open checkout shipping page |
||
57 | */ |
||
58 | public function iTryToOpenCheckoutShippingPage() |
||
62 | |||
63 | /** |
||
64 | * @Given I have selected :shippingMethod shipping method |
||
65 | * @When I select :shippingMethod shipping method |
||
66 | */ |
||
67 | public function iSelectShippingMethod($shippingMethod) |
||
71 | |||
72 | /** |
||
73 | * @Then I should not be able to select :shippingMethodName shipping method |
||
74 | */ |
||
75 | public function iShouldNotBeAbleToSelectShippingMethod($shippingMethodName) |
||
79 | |||
80 | /** |
||
81 | * @Then I should have :shippingMethodName shipping method available as the first choice |
||
82 | */ |
||
83 | public function iShouldHaveShippingMethodAvailableAsFirstChoice($shippingMethodName) |
||
90 | |||
91 | /** |
||
92 | * @Then I should have :shippingMethodName shipping method available as the last choice |
||
93 | */ |
||
94 | public function iShouldHaveShippingMethodAvailableAsLastChoice($shippingMethodName) |
||
101 | |||
102 | /** |
||
103 | * @When /^I(?:| try to) complete the shipping step$/ |
||
104 | */ |
||
105 | public function iCompleteTheShippingStep() |
||
109 | |||
110 | /** |
||
111 | * @When I decide to change my address |
||
112 | */ |
||
113 | public function iDecideToChangeMyAddress() |
||
117 | |||
118 | /** |
||
119 | * @When I go back to shipping step of the checkout |
||
120 | */ |
||
121 | public function iGoBackToShippingStepOfTheCheckout() |
||
125 | |||
126 | /** |
||
127 | * @Then I should be on the checkout shipping step |
||
128 | */ |
||
129 | public function iShouldBeOnTheCheckoutShippingStep() |
||
133 | |||
134 | /** |
||
135 | * @Then I should be informed that my order cannot be shipped to this address |
||
136 | */ |
||
137 | public function iShouldBeInformedThatMyOrderCannotBeShippedToThisAddress() |
||
141 | |||
142 | /** |
||
143 | * @Then I should be able to go to the complete step again |
||
144 | */ |
||
145 | public function iShouldBeAbleToGoToTheCompleteStepAgain() |
||
151 | |||
152 | /** |
||
153 | * @Then I should be redirected to the shipping step |
||
154 | */ |
||
155 | public function iShouldBeRedirectedToTheShippingStep() |
||
159 | |||
160 | /** |
||
161 | * @Given I should be able to go to the payment step again |
||
162 | */ |
||
163 | public function iShouldBeAbleToGoToThePaymentStepAgain() |
||
169 | |||
170 | /** |
||
171 | * @Given I should see shipping method :shippingMethodName with fee :fee |
||
172 | */ |
||
173 | public function iShouldSeeShippingFee($shippingMethodName, $fee) |
||
177 | |||
178 | /** |
||
179 | * @Then there should be information about no available shipping methods |
||
180 | */ |
||
181 | public function thereShouldBeInformationAboutNoShippingMethodsAvailableForMyShippingAddress() |
||
185 | |||
186 | /** |
||
187 | * @Then I should see :shippingMethodName shipping method |
||
188 | */ |
||
189 | public function iShouldSeeShippingMethod($shippingMethodName) |
||
193 | |||
194 | /** |
||
195 | * @Then I should not see :shippingMethodName shipping method |
||
196 | */ |
||
197 | public function iShouldNotSeeShippingMethod($shippingMethodName) |
||
201 | |||
202 | /** |
||
203 | * @Then I should be checking out as :email |
||
204 | */ |
||
205 | public function iShouldBeCheckingOutAs($email) |
||
209 | } |
||
210 |