1 | <?php |
||
14 | final class CheckoutShippingContext 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 | * @Given I have selected :shippingMethod shipping method |
||
57 | * @When I select :shippingMethod shipping method |
||
58 | */ |
||
59 | public function iSelectShippingMethod($shippingMethod) |
||
63 | |||
64 | /** |
||
65 | * @When I try to open checkout shipping page |
||
66 | */ |
||
67 | public function iTryToOpenCheckoutShippingPage() |
||
71 | |||
72 | /** |
||
73 | * @When /^I(?:| try to) complete the shipping step$/ |
||
74 | */ |
||
75 | public function iCompleteTheShippingStep() |
||
79 | |||
80 | /** |
||
81 | * @When I decide to change my address |
||
82 | */ |
||
83 | public function iDecideToChangeMyAddress() |
||
87 | |||
88 | /** |
||
89 | * @When I go back to shipping step of the checkout |
||
90 | */ |
||
91 | public function iGoBackToShippingStepOfTheCheckout() |
||
95 | |||
96 | /** |
||
97 | * @Then I should not be able to select :shippingMethodName shipping method |
||
98 | */ |
||
99 | public function iShouldNotBeAbleToSelectShippingMethod($shippingMethodName) |
||
103 | |||
104 | /** |
||
105 | * @Then I should have :shippingMethodName shipping method available as the first choice |
||
106 | */ |
||
107 | public function iShouldHaveShippingMethodAvailableAsFirstChoice($shippingMethodName) |
||
114 | |||
115 | /** |
||
116 | * @Then I should have :shippingMethodName shipping method available as the last choice |
||
117 | */ |
||
118 | public function iShouldHaveShippingMethodAvailableAsLastChoice($shippingMethodName) |
||
125 | |||
126 | /** |
||
127 | * @Then I should be on the checkout shipping step |
||
128 | * @Then I should be redirected to the shipping step |
||
129 | */ |
||
130 | public function iShouldBeOnTheCheckoutShippingStep() |
||
134 | |||
135 | /** |
||
136 | * @Then I should be informed that my order cannot be shipped to this address |
||
137 | */ |
||
138 | public function iShouldBeInformedThatMyOrderCannotBeShippedToThisAddress() |
||
142 | |||
143 | /** |
||
144 | * @Then I should be able to go to the complete step again |
||
145 | */ |
||
146 | public function iShouldBeAbleToGoToTheCompleteStepAgain() |
||
152 | |||
153 | /** |
||
154 | * @Then I should be able to go to the payment step again |
||
155 | */ |
||
156 | public function iShouldBeAbleToGoToThePaymentStepAgain() |
||
162 | |||
163 | /** |
||
164 | * @Then I should see shipping method :shippingMethodName with fee :fee |
||
165 | */ |
||
166 | public function iShouldSeeShippingFee($shippingMethodName, $fee) |
||
170 | |||
171 | /** |
||
172 | * @Then there should be information about no available shipping methods |
||
173 | */ |
||
174 | public function thereShouldBeInformationAboutNoShippingMethodsAvailableForMyShippingAddress() |
||
178 | |||
179 | /** |
||
180 | * @Then I should see :shippingMethodName shipping method |
||
181 | */ |
||
182 | public function iShouldSeeShippingMethod($shippingMethodName) |
||
186 | |||
187 | /** |
||
188 | * @Then I should not see :shippingMethodName shipping method |
||
189 | */ |
||
190 | public function iShouldNotSeeShippingMethod($shippingMethodName) |
||
194 | |||
195 | /** |
||
196 | * @Then I should be checking out as :email |
||
197 | */ |
||
198 | public function iShouldBeCheckingOutAs($email) |
||
202 | } |
||
203 |