Skip to content

Commit d56f7c5

Browse files
committed
MC-290: Customer should be able to change chosen options for Bundle Product when clicking Edit button in Shopping Cart page
- Delete bundle product after test
1 parent 4880360 commit d56f7c5

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Section/StorefrontBundledSection.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="StorefrontBundledSection">
1212
<element name="nthBundledOption" type="input" selector=".option:nth-of-type({{numOption}}) .choice:nth-of-type({{numOptionSelect}}) input" parameterized="true"/>
13-
<element name="addToCart" type="button" selector="#bundle-slide"/>
14-
<element name="addToCartConfigured" type="button" selector="#product-addtocart-button"/>
15-
<element name="updateCart" type="button" selector="#product-updatecart-button"/>
13+
<element name="addToCart" type="button" selector="#bundle-slide" timeout="30"/>
14+
<element name="addToCartConfigured" type="button" selector="#product-addtocart-button" timeout="30"/>
15+
<element name="updateCart" type="button" selector="#product-updatecart-button" timeout="30"/>
1616
<element name="configuredPrice" type="block" selector=".price-configured_price .price"/>
1717
</section>
1818
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/StorefrontEditBundleProductTest.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
<amOnPage url="/checkout/cart/" stepKey="onPageShoppingCart"/>
9090
<waitForPageLoad stepKey="waitForCartPageLoad"/>
9191
<waitForElementVisible stepKey="waitForInfoDropdown" selector="{{CheckoutCartSummarySection.total}}"/>
92+
<waitForPageLoad stepKey="waitForCartPageLoad3"/>
9293
<grabTextFrom selector="{{CheckoutCartSummarySection.total}}" stepKey="grabTotalBefore"/>
9394
<click stepKey="clickEdit" selector="{{CheckoutCartProductSection.nthEditButton('1')}}"/>
9495
<waitForPageLoad stepKey="waitForStorefront2"/>
@@ -110,8 +111,14 @@
110111
<!-- Assert that the options are both there and the proce no longer matches -->
111112
<see stepKey="assertBothOptions" selector="{{CheckoutCartProductSection.nthItemOption('2')}}" userInput="$$simpleProduct1.sku$$"/>
112113
<see stepKey="assertBothOptions2" selector="{{CheckoutCartProductSection.nthItemOption('2')}}" userInput="$$simpleProduct2.sku$$"/>
114+
<waitForElementVisible stepKey="waitForInfoDropdown2" selector="{{CheckoutCartSummarySection.total}}"/>
115+
<waitForPageLoad stepKey="waitForCartPageLoad4"/>
113116
<grabTextFrom selector="{{CheckoutCartSummarySection.total}}" stepKey="grabTotalAfter"/>
114117
<assertNotEquals expected="{$grabTotalBefore}" expectedType="string" actual="{$grabTotalAfter}" actualType="string" stepKey="assertNotEquals"/>
115118

119+
<!-- Delete the bundled product -->
120+
<actionGroup stepKey="deleteBundle" ref="deleteProductUsingProductGrid">
121+
<argument name="product" value="BundleProduct"/>
122+
</actionGroup>
116123
</test>
117124
</tests>

0 commit comments

Comments
 (0)