|
10 | 10 | <test name="StorefrontInstantPurchaseFunctionalityNegativeScenarioTest">
|
11 | 11 | <annotations>
|
12 | 12 | <features value="InstantPurchase"/>
|
13 |
| - <stories value="Using Instant Purchase - Negative Scenario"/> |
| 13 | + <stories value="Using Instant Purchase"/> |
14 | 14 | <title value="Checks negative Instant Purchase functionality scenario"/>
|
15 |
| - <description value="Checks that Instant Purchase button does not appears in a different situation"/> |
16 |
| - <useCaseId value="MAGETWO-84214"/> |
| 15 | + <description value="Checks that Instant Purchase button does not appear in a different situation"/> |
17 | 16 | <testCaseId value="MC-25949"/>
|
18 | 17 | <severity value="CRITICAL"/>
|
19 | 18 | <group value="instant_purchase"/>
|
|
55 | 54 | <requiredEntity createDataKey="createGroupedProduct"/>
|
56 | 55 | <requiredEntity createDataKey="createSimpleProduct"/>
|
57 | 56 | </createData>
|
| 57 | + <!-- Reindex invalidated indices after product attribute has been created/deleted --> |
| 58 | + <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> |
58 | 59 | <!-- Log in as a customer -->
|
59 | 60 | <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLoginToStorefront">
|
60 | 61 | <argument name="Customer" value="$customerWithDefaultAddress$"/>
|
|
104 | 105 | <deleteData createDataKey="createConfigChildProduct1CreateConfigurableProduct" stepKey="deleteConfigChildProduct1"/>
|
105 | 106 | <deleteData createDataKey="createConfigChildProduct2CreateConfigurableProduct" stepKey="deleteConfigChildProduct2"/>
|
106 | 107 | <!-- Reindex invalidated indices after product attribute has been created/deleted -->
|
107 |
| - <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> |
| 108 | + <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndicesAfterTest"/> |
108 | 109 | </after>
|
109 | 110 | <!-- 1. Ensure customer is a guest -->
|
110 | 111 | <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
|
|
147 | 148 | <argument name="Customer" value="$customerWithoutAddress$"/>
|
148 | 149 | </actionGroup>
|
149 | 150 | <!-- 4. Browse simple product page and check that Instant Purchase button does not show up -->
|
150 |
| - <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageAgain"> |
| 151 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageWithCustomerWithoutAddress"> |
151 | 152 | <argument name="product" value="$createSimpleProduct$"/>
|
152 | 153 | </actionGroup>
|
153 |
| - <dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageAgain"/> |
| 154 | + <dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductAsCustomerWithoutAddress"/> |
154 | 155 | <!-- 5. Log in as a customer with address -->
|
155 | 156 | <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomerWithoutAddress"/>
|
156 | 157 | <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerWithAddressLoginToStorefront">
|
157 | 158 | <argument name="Customer" value="$customerWithAddress$"/>
|
158 | 159 | </actionGroup>
|
159 | 160 | <!-- 6. Browse simple product page and check that Instant Purchase button does not show up -->
|
160 |
| - <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageOneMoreTime"> |
| 161 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageWithCustomerWithAddress"> |
161 | 162 | <argument name="product" value="$createSimpleProduct$"/>
|
162 | 163 | </actionGroup>
|
163 |
| - <dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageOneMoreTime"/> |
| 164 | + <dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageAsCustomerWithAddress"/> |
164 | 165 | <!-- 7. Log in as a customer with default address -->
|
165 | 166 | <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomerWithAddress"/>
|
166 | 167 | <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerWithDefaultAddressLoginToStorefront">
|
167 | 168 | <argument name="Customer" value="$customerWithDefaultAddress$"/>
|
168 | 169 | </actionGroup>
|
169 | 170 | <!-- 8. Browse simple product page and check that Instant Purchase button show up -->
|
170 |
| - <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageForFourthTime"> |
| 171 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageWithCustomerWithDefaultAddress"> |
171 | 172 | <argument name="product" value="$createSimpleProduct$"/>
|
172 | 173 | </actionGroup>
|
173 | 174 | <waitForElementVisible selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="waitForInstantPurchaseButton"/>
|
174 | 175 | <!-- 9-10. Configure Braintree Payment Method(without Vault). Configure 3d Secure Verification -->
|
175 | 176 | <magentoCLI command="config:set {{DisableVaultBraintree.path}} {{DisableVaultBraintree.value}}" stepKey="disableVault"/>
|
176 | 177 | <magentoCLI command="config:set {{Enable3DSecureBraintree.path}} {{Enable3DSecureBraintree.value}}" stepKey="enable3DSecureVerification"/>
|
177 | 178 | <!-- New session should be started -->
|
178 |
| - <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomerWithAddressAgain"/> |
179 |
| - <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerWithDefaultAddressLoginToStorefrontAgain"> |
| 179 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomerWithDefaultAddressAfter3dSecureEnabled"/> |
| 180 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerWithDefaultAddressLoginToStorefrontAfter3dSecureEnabled"> |
180 | 181 | <argument name="Customer" value="$customerWithDefaultAddress$"/>
|
181 | 182 | </actionGroup>
|
182 | 183 | <!-- 11. Browse simple product page and check that Instant Purchase button does not show up -->
|
183 |
| - <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageForFifthTime"> |
| 184 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageWith3dSecureEnabled"> |
184 | 185 | <argument name="product" value="$createSimpleProduct$"/>
|
185 | 186 | </actionGroup>
|
186 |
| - <dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageForFifthTime"/> |
| 187 | + <dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageWith3dSecureEnabled"/> |
187 | 188 | <!-- 12. Disable all supported payment methods -->
|
188 | 189 | <createData entity="DefaultBraintreeConfig" stepKey="restoreToDefaultBraintreeConfig"/>
|
189 | 190 | <createData entity="RollBackCustomBraintreeConfigurationData" stepKey="restoreToDefaultBraintreeConfigurationData"/>
|
190 | 191 | <!-- New session should be started -->
|
191 |
| - <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomerWithAddressOneMoreTime"/> |
192 |
| - <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerWithDefaultAddressLoginToStorefrontOneMoreTime"> |
| 192 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomerWithDefaultAddressAfterPaymentMethodDisabled"/> |
| 193 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerWithDefaultAddressLoginToStorefrontAfterPaymentMethodDisabled"> |
193 | 194 | <argument name="Customer" value="$customerWithDefaultAddress$"/>
|
194 | 195 | </actionGroup>
|
195 | 196 | <!-- 13. Browse simple product page and check that Instant Purchase button does not show up -->
|
196 |
| - <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageForSixthTime"> |
| 197 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageWhilePaymentMethodDisabled"> |
197 | 198 | <argument name="product" value="$createSimpleProduct$"/>
|
198 | 199 | </actionGroup>
|
199 |
| - <dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageForSixthTime"/> |
| 200 | + <dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductWhilePaymentMethodDisabled"/> |
200 | 201 | <!-- 14. Reenable supported payment method (without 3d secure for Braintree) -->
|
201 | 202 | <magentoCLI command="config:set {{Disable3DSecureBraintree.path}} {{Disable3DSecureBraintree.value}}" stepKey="disable3DSecureVerification"/>
|
202 | 203 | <createData entity="BraintreeConfig" stepKey="reenableBraintreePayment"/>
|
203 | 204 | <createData entity="CustomBraintreeConfigurationData" stepKey="reenableBraintreeAndVault"/>
|
204 | 205 | <!-- New session should be started -->
|
205 |
| - <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomerWithAddressForFourthTime"/> |
206 |
| - <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerWithDefaultAddressLoginToStorefrontFinalTime"> |
| 206 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomerWithDefaultAddressAfterReenablePaymentMethod"/> |
| 207 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerWithDefaultAddressLoginToStorefrontAfterReenablePaymentMethod"> |
207 | 208 | <argument name="Customer" value="$customerWithDefaultAddress$"/>
|
208 | 209 | </actionGroup>
|
209 | 210 | <!-- 15. Browse simple product page and check that Instant Purchase button show up -->
|
210 |
| - <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageForSeventhTime"> |
| 211 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageWithReenabledPaymentMethod"> |
211 | 212 | <argument name="product" value="$createSimpleProduct$"/>
|
212 | 213 | </actionGroup>
|
213 |
| - <waitForElementVisible selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="waitForInstantPurchaseButtonAgain"/> |
| 214 | + <waitForElementVisible selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="waitForInstantPurchaseButtonWithReenabledPaymentMethod"/> |
214 | 215 | <!-- 16. Disable shipping method for customer with default address -->
|
215 | 216 | <magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/>
|
216 | 217 | <!-- New session should be started -->
|
217 |
| - <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomerWithAddressForFifthTime"/> |
218 |
| - <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerWithDefaultAddressLoginToStorefrontForFifthTime"> |
| 218 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomerWithDefaultAddressAfterFlatRateDisabled"/> |
| 219 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerWithDefaultAddressLoginToStorefrontAfterFlatRateDisabled"> |
219 | 220 | <argument name="Customer" value="$customerWithDefaultAddress$"/>
|
220 | 221 | </actionGroup>
|
221 | 222 | <!-- 17. Browse simple product page and check that Instant Purchase button does not show up -->
|
222 |
| - <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageFinalTime"> |
| 223 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openSimpleProductPageWhileFlatRateDisabled"> |
223 | 224 | <argument name="product" value="$createSimpleProduct$"/>
|
224 | 225 | </actionGroup>
|
225 |
| - <dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageFinalTime"/> |
| 226 | + <dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageWhileFlatRateDisabled"/> |
226 | 227 | </test>
|
227 | 228 | </tests>
|
0 commit comments