Skip to content

Commit 11170c9

Browse files
Manjusha.SManjusha.S
authored andcommitted
Merge branch 'ACQE-4219' into functional-testing-automation-version2
2 parents 1f23a45 + d5e1c08 commit 11170c9

File tree

1 file changed

+125
-0
lines changed

1 file changed

+125
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="EditOrderWithBundleProductBackendProductEvenAfterOneOfMoreSelectedOptionsAreRemovedFromAdminTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Verify that the user is able to checkout bundled product even after one of more selected options are removed from admin"/>
15+
<title value="Verify that the user is able to checkout bundled product even after one of more selected options are removed from admin"/>
16+
<description value="Verify that the user is able to checkout bundled product even after one of more selected options are removed from admin"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-4608"/>
19+
</annotations>
20+
<before>
21+
<!-- Create Customer Account -->
22+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
23+
24+
<!-- simple product1-->
25+
<createData entity="SimpleProduct" stepKey="SimpleProduct1">
26+
<field key="price">10.00</field>
27+
</createData>
28+
29+
<!-- simple product2 -->
30+
<createData entity="SimpleProduct" stepKey="SimpleProduct2">
31+
<field key="price">15.00</field>
32+
</createData>
33+
34+
<createData entity="ApiBundleProduct" stepKey="createBundleProduct"/>
35+
36+
<createData entity="RadioButtonsOption" stepKey="radioButtonsOption1">
37+
<requiredEntity createDataKey="createBundleProduct"/>
38+
</createData>
39+
40+
<createData entity="RadioButtonsOption" stepKey="radioButtonsOption2">
41+
<requiredEntity createDataKey="createBundleProduct"/>
42+
</createData>
43+
44+
<createData entity="ApiBundleLink" stepKey="LinkOptionToFirstProduct1">
45+
<requiredEntity createDataKey="createBundleProduct"/>
46+
<requiredEntity createDataKey="radioButtonsOption1"/>
47+
<requiredEntity createDataKey="SimpleProduct1"/>
48+
</createData>
49+
<createData entity="ApiBundleLink" stepKey="LinkOptionToSecondProduct12">
50+
<requiredEntity createDataKey="createBundleProduct"/>
51+
<requiredEntity createDataKey="radioButtonsOption2"/>
52+
<requiredEntity createDataKey="SimpleProduct2"/>
53+
</createData>
54+
55+
<!-- Login as admin -->
56+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
57+
</before>
58+
<after>
59+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
60+
<!-- Delete the simple product -->
61+
<deleteData createDataKey="SimpleProduct1" stepKey="DeleteSimpleProduct1"/>
62+
63+
<!-- Delete the simple product -->
64+
<deleteData createDataKey="SimpleProduct2" stepKey="DeleteSimpleProduct2"/>
65+
66+
<deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/>
67+
68+
<!-- Log out -->
69+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
70+
</after>
71+
72+
<!--Login customer on storefront-->
73+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginCustomer">
74+
<argument name="Customer" value="$$createCustomer$$" />
75+
</actionGroup>
76+
<!--Open Product Page-->
77+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openBundleProductPage">
78+
<argument name="product" value="$createBundleProduct$"/>
79+
</actionGroup>
80+
<!--Add bundle to cart-->
81+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickAddToCart"/>
82+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart">
83+
<argument name="quantity" value="1"/>
84+
</actionGroup>
85+
86+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCart"/>
87+
88+
<see selector="{{StorefrontBundledSection.nthItemOptionsValue('1')}}" userInput="1 x $$SimpleProduct1.name$$ $10.00" stepKey="seeOptionValue1"/>
89+
<see selector="{{StorefrontBundledSection.nthItemOptionsValue('2')}}" userInput="1 x $$SimpleProduct2.name$$ $15.00" stepKey="seeOptionValue2"/>
90+
91+
<openNewTab stepKey="openNewTab"/>
92+
93+
<!--Open bundle product in admin-->
94+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage">
95+
<argument name="productId" value="$createBundleProduct.id$"/>
96+
</actionGroup>
97+
98+
<!-- Remove second option -->
99+
<actionGroup ref="DeleteBundleOptionByIndexActionGroup" stepKey="deleteSecondOption">
100+
<argument name="deleteIndex" value="1"/>
101+
</actionGroup>
102+
103+
<!-- Save product form -->
104+
<actionGroup ref="SaveProductFormActionGroup" stepKey="clickSaveProduct"/>
105+
106+
<switchToPreviousTab stepKey="switchToPreviousTab"/>
107+
108+
<reloadPage stepKey="reloadPage"/>
109+
110+
<dontSee selector="{{StorefrontBundledSection.nthItemOptionsValue('2')}}" userInput="1 x $$SimpleProduct1.name$$ $15.00" stepKey="assertNotBannerDescription"/>
111+
112+
<actionGroup ref="AssertStorefrontErrorMessageSignInPopupFormActionGroup" stepKey="seeErrorMessage">
113+
<argument name="message" value="Some of the products below do not have all the required options."/>
114+
</actionGroup>
115+
116+
<click stepKey="clickEdit" selector="{{CheckoutCartProductSection.nthEditButton('1')}}"/>
117+
118+
<click selector="{{StorefrontProductInfoMainSection.updateCart}}" stepKey="clickUpdateCartButton"/>
119+
120+
<click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="clickProceedToCheckout"/>
121+
122+
<see selector="{{CheckoutHeaderSection.shippingMethodStep}}" userInput="Shipping" stepKey="checkShippingHeader"/>
123+
124+
</test>
125+
</tests>

0 commit comments

Comments
 (0)