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 | * @When I proceed with :shippingMethodName shipping method |
||
49 | */ |
||
50 | public function iHaveProceededSelectingShippingMethod($shippingMethodName) |
||
55 | |||
56 | /** |
||
57 | * @Given I have selected :shippingMethod shipping method |
||
58 | * @When I select :shippingMethod shipping method |
||
59 | */ |
||
60 | public function iSelectShippingMethod($shippingMethod) |
||
64 | |||
65 | /** |
||
66 | * @When I try to open checkout shipping page |
||
67 | */ |
||
68 | public function iTryToOpenCheckoutShippingPage() |
||
72 | |||
73 | /** |
||
74 | * @When /^I(?:| try to) complete the shipping step$/ |
||
75 | */ |
||
76 | public function iCompleteTheShippingStep() |
||
80 | |||
81 | /** |
||
82 | * @When I decide to change my address |
||
83 | */ |
||
84 | public function iDecideToChangeMyAddress() |
||
88 | |||
89 | /** |
||
90 | * @When I go back to shipping step of the checkout |
||
91 | */ |
||
92 | public function iGoBackToShippingStepOfTheCheckout() |
||
96 | |||
97 | /** |
||
98 | * @Then I should not be able to select :shippingMethodName shipping method |
||
99 | */ |
||
100 | public function iShouldNotBeAbleToSelectShippingMethod($shippingMethodName) |
||
104 | |||
105 | /** |
||
106 | * @Then I should have :shippingMethodName shipping method available as the first choice |
||
107 | */ |
||
108 | 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) |
||
124 | |||
125 | /** |
||
126 | * @Then I should be on the checkout shipping step |
||
127 | * @Then I should be redirected to the 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 able to go to the payment step again |
||
154 | */ |
||
155 | public function iShouldBeAbleToGoToThePaymentStepAgain() |
||
161 | |||
162 | /** |
||
163 | * @Then I should see shipping method :shippingMethodName with fee :fee |
||
164 | */ |
||
165 | public function iShouldSeeShippingFee($shippingMethodName, $fee) |
||
169 | |||
170 | /** |
||
171 | * @Then there should be information about no available shipping methods |
||
172 | */ |
||
173 | public function thereShouldBeInformationAboutNoShippingMethodsAvailableForMyShippingAddress() |
||
177 | |||
178 | /** |
||
179 | * @Then I should see :shippingMethodName shipping method |
||
180 | */ |
||
181 | public function iShouldSeeShippingMethod($shippingMethodName) |
||
185 | |||
186 | /** |
||
187 | * @Then I should not see :shippingMethodName shipping method |
||
188 | */ |
||
189 | public function iShouldNotSeeShippingMethod($shippingMethodName) |
||
193 | |||
194 | /** |
||
195 | * @Then I should be checking out as :email |
||
196 | */ |
||
197 | public function iShouldBeCheckingOutAs($email) |
||
201 | } |
||
202 |