Skip to content

Commit 5d9657e

Browse files
committed
MAGETWO-92957: Automate with MFTF Add and Edit one Bundle product with different set of sub-items to the Shopping Cart
1 parent 61dd207 commit 5d9657e

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<description value="Customer should be able to change chosen options for Bundle Product when clicking Edit button in Shopping Cart page"/>
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MAGETWO-77523"/>
19-
<group value="Bundle"/>
19+
<group value="bundle"/>
2020
</annotations>
2121
<before>
2222
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
@@ -53,12 +53,12 @@
5353
<actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions">
5454
<argument name="product" value="$$simpleProduct1$$"/>
5555
</actionGroup>
56-
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/>
56+
<checkOption selector="{{AdminAddProductsToOptionPanelSection.firstCheckbox}}" stepKey="selectFirstGridRow"/>
5757
<actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions2">
5858
<argument name="product" value="$$simpleProduct2$$"/>
5959
</actionGroup>
60-
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/>
61-
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/>
60+
<checkOption selector="{{AdminAddProductsToOptionPanelSection.firstCheckbox}}" stepKey="selectFirstGridRow2"/>
61+
<click selector="{{AdminAddProductsToOptionPanelSection.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/>
6262
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/>
6363
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/>
6464

@@ -86,7 +86,7 @@
8686
<waitForPageLoad stepKey="waitForElementAdded2"/>
8787

8888
<!-- Go to the shopping cart page and edit the first product -->
89-
<amOnPage url="/checkout/cart/" stepKey="onPageShoppingCart"/>
89+
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="onPageShoppingCart"/>
9090
<waitForPageLoad stepKey="waitForCartPageLoad"/>
9191
<waitForElementVisible selector="{{CheckoutCartSummarySection.total}}" stepKey="waitForInfoDropdown"/>
9292
<waitForPageLoad stepKey="waitForCartPageLoad3"/>
@@ -105,7 +105,7 @@
105105
<waitForPageLoad stepKey="waitForElementAdded3"/>
106106

107107
<!-- Go to the shopping cart page -->
108-
<amOnPage url="/checkout/cart/" stepKey="onPageShoppingCart2"/>
108+
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="onPageShoppingCart2"/>
109109
<waitForPageLoad stepKey="waitForCartPageLoad2"/>
110110

111111
<!-- Assert that the options are both there and the proce no longer matches -->

app/code/Magento/Catalog/Test/Mftf/Page/StorefrontProductPage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
1111
<page name="StorefrontProductPage" url="/{{var1}}.html" area="storefront" module="Category" parameterized="true">
1212
<section name="StorefrontProductPageSection"/>
13+
<section name="StorefrontBundledSection"/>
1314
</page>
1415
</pages>

app/code/Magento/Catalog/Test/Mftf/Section/AdminAddProductsToOptionPanelSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11-
<section name="AdminAddProductsToOptionPanel">
11+
<section name="AdminAddProductsToOptionPanelSection">
1212
<element name="addSelectedProducts" type="button" selector=".product_form_product_form_bundle-items_modal button.action-primary" timeout="30"/>
1313
<element name="firstCheckbox" type="input" selector="tr[data-repeat-index='0'] .admin__control-checkbox"/>
1414
</section>
15-
</sections>
15+
</sections>

0 commit comments

Comments
 (0)