Skip to content

Commit b10b2aa

Browse files
committed
MC-24244: [MFTF Test] Instant purchase negative scenarios
1 parent 41a980c commit b10b2aa

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

app/code/Magento/InstantPurchase/Test/Mftf/Test/StorefrontInstantPurchaseFunctionalityNegativeScenarioTest.xml

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
<test name="StorefrontInstantPurchaseFunctionalityNegativeScenarioTest">
1111
<annotations>
1212
<features value="InstantPurchase"/>
13-
<stories value="Using Instant Purchase - Negative Scenario"/>
13+
<stories value="Using Instant Purchase"/>
1414
<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"/>
1716
<testCaseId value="MC-25949"/>
1817
<severity value="CRITICAL"/>
1918
<group value="instant_purchase"/>
@@ -55,6 +54,8 @@
5554
<requiredEntity createDataKey="createGroupedProduct"/>
5655
<requiredEntity createDataKey="createSimpleProduct"/>
5756
</createData>
57+
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
58+
<actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/>
5859
<!-- Log in as a customer -->
5960
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLoginToStorefront">
6061
<argument name="Customer" value="$customerWithDefaultAddress$"/>
@@ -104,7 +105,7 @@
104105
<deleteData createDataKey="createConfigChildProduct1CreateConfigurableProduct" stepKey="deleteConfigChildProduct1"/>
105106
<deleteData createDataKey="createConfigChildProduct2CreateConfigurableProduct" stepKey="deleteConfigChildProduct2"/>
106107
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
107-
<actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/>
108+
<actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndicesAfterTest"/>
108109
</after>
109110
<!-- 1. Ensure customer is a guest -->
110111
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
@@ -147,81 +148,81 @@
147148
<argument name="Customer" value="$customerWithoutAddress$"/>
148149
</actionGroup>
149150
<!-- 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">
151152
<argument name="product" value="$createSimpleProduct$"/>
152153
</actionGroup>
153-
<dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageAgain"/>
154+
<dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductAsCustomerWithoutAddress"/>
154155
<!-- 5. Log in as a customer with address -->
155156
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomerWithoutAddress"/>
156157
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerWithAddressLoginToStorefront">
157158
<argument name="Customer" value="$customerWithAddress$"/>
158159
</actionGroup>
159160
<!-- 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">
161162
<argument name="product" value="$createSimpleProduct$"/>
162163
</actionGroup>
163-
<dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageOneMoreTime"/>
164+
<dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageAsCustomerWithAddress"/>
164165
<!-- 7. Log in as a customer with default address -->
165166
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomerWithAddress"/>
166167
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerWithDefaultAddressLoginToStorefront">
167168
<argument name="Customer" value="$customerWithDefaultAddress$"/>
168169
</actionGroup>
169170
<!-- 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">
171172
<argument name="product" value="$createSimpleProduct$"/>
172173
</actionGroup>
173174
<waitForElementVisible selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="waitForInstantPurchaseButton"/>
174175
<!-- 9-10. Configure Braintree Payment Method(without Vault). Configure 3d Secure Verification -->
175176
<magentoCLI command="config:set {{DisableVaultBraintree.path}} {{DisableVaultBraintree.value}}" stepKey="disableVault"/>
176177
<magentoCLI command="config:set {{Enable3DSecureBraintree.path}} {{Enable3DSecureBraintree.value}}" stepKey="enable3DSecureVerification"/>
177178
<!-- 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">
180181
<argument name="Customer" value="$customerWithDefaultAddress$"/>
181182
</actionGroup>
182183
<!-- 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">
184185
<argument name="product" value="$createSimpleProduct$"/>
185186
</actionGroup>
186-
<dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageForFifthTime"/>
187+
<dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageWith3dSecureEnabled"/>
187188
<!-- 12. Disable all supported payment methods -->
188189
<createData entity="DefaultBraintreeConfig" stepKey="restoreToDefaultBraintreeConfig"/>
189190
<createData entity="RollBackCustomBraintreeConfigurationData" stepKey="restoreToDefaultBraintreeConfigurationData"/>
190191
<!-- 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">
193194
<argument name="Customer" value="$customerWithDefaultAddress$"/>
194195
</actionGroup>
195196
<!-- 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">
197198
<argument name="product" value="$createSimpleProduct$"/>
198199
</actionGroup>
199-
<dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageForSixthTime"/>
200+
<dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductWhilePaymentMethodDisabled"/>
200201
<!-- 14. Reenable supported payment method (without 3d secure for Braintree) -->
201202
<magentoCLI command="config:set {{Disable3DSecureBraintree.path}} {{Disable3DSecureBraintree.value}}" stepKey="disable3DSecureVerification"/>
202203
<createData entity="BraintreeConfig" stepKey="reenableBraintreePayment"/>
203204
<createData entity="CustomBraintreeConfigurationData" stepKey="reenableBraintreeAndVault"/>
204205
<!-- 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">
207208
<argument name="Customer" value="$customerWithDefaultAddress$"/>
208209
</actionGroup>
209210
<!-- 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">
211212
<argument name="product" value="$createSimpleProduct$"/>
212213
</actionGroup>
213-
<waitForElementVisible selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="waitForInstantPurchaseButtonAgain"/>
214+
<waitForElementVisible selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="waitForInstantPurchaseButtonWithReenabledPaymentMethod"/>
214215
<!-- 16. Disable shipping method for customer with default address -->
215216
<magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/>
216217
<!-- 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">
219220
<argument name="Customer" value="$customerWithDefaultAddress$"/>
220221
</actionGroup>
221222
<!-- 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">
223224
<argument name="product" value="$createSimpleProduct$"/>
224225
</actionGroup>
225-
<dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageFinalTime"/>
226+
<dontSeeElement selector="{{StorefrontInstantPurchaseSection.instantPurchaseButton}}" stepKey="dontSeeButtonOnSimpleProductPageWhileFlatRateDisabled"/>
226227
</test>
227228
</tests>

0 commit comments

Comments
 (0)