Skip to content

Commit 3a097b2

Browse files
author
John Carlo Octabio
committed
Merge branch '108_clear-shopping-cart-button-configuration' of github.com:jacotabio/magento2 into 108_clear-shopping-cart-button-configuration
2 parents e8a36e7 + e5724ef commit 3a097b2

File tree

729 files changed

+30969
-4806
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

729 files changed

+30969
-4806
lines changed

app/code/Magento/AdminAnalytics/Test/Mftf/Test/TrackingScriptTest.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

app/code/Magento/Backend/Test/Mftf/Section/AdminMenuSection.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<element name="widgets" type="button" selector="#nav li[data-ui-id='menu-magento-widget-cms-widget-instance']"/>
1818
<element name="stores" type="button" selector="#menu-magento-backend-stores"/>
1919
<element name="configuration" type="button" selector="#nav li[data-ui-id='menu-magento-config-system-config']"/>
20-
<element name="dashboard" type="button" selector="//li[@id='menu-magento-backend-dashboard']"/>
21-
<element name="sales" type="button" selector="//li[@id='menu-magento-sales-sales']"/>
22-
<element name="marketing" type="button" selector="//li[@id='menu-magento-backend-marketing']"/>
23-
<element name="system" type="button" selector="//li[@id='menu-magento-backend-system']"/>
24-
<element name="findPartners" type="button" selector="//li[@id='menu-magento-marketplace-partners']"/>
20+
<element name="dashboard" type="button" selector="#menu-magento-backend-dashboard"/>
21+
<element name="sales" type="button" selector="#menu-magento-sales-sales"/>
22+
<element name="marketing" type="button" selector="#menu-magento-backend-marketing"/>
23+
<element name="system" type="button" selector="#menu-magento-backend-system"/>
24+
<element name="findPartners" type="button" selector="#menu-magento-marketplace-partners"/>
2525

2626
<!-- Navigate menu selectors -->
2727
<element name="menuItem" type="button" selector="li[data-ui-id='menu-{{dataUiId}}']" parameterized="true" timeout="30"/>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertStorefrontBundleValidationMessageActionGroup">
12+
<annotations>
13+
<description>Check error message in validation message box</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="message" type="string"/>
17+
</arguments>
18+
19+
<waitForPageLoad stepKey="waitForPageLoad"/>
20+
<see selector="{{StorefrontBundledSection.validationMessageBox}}" userInput="{{message}}" stepKey="seeErrorHoldMessage"/>
21+
</actionGroup>
22+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertStorefrontBundleValidationMessagesCountActionGroup">
12+
<annotations>
13+
<description>Check if there's a validation message box on page and asserts the validation messages number</description>
14+
</annotations>
15+
16+
<waitForPageLoad stepKey="waitForPageLoad"/>
17+
<seeElement selector="{{StorefrontBundledSection.validationMessageBox}}" stepKey="seeErrorBox"/>
18+
<seeNumberOfElements selector="{{StorefrontBundledSection.validationMessageBox}}" userInput="1" stepKey="seeOneErrorBox"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontAddToTheCartButtonActionGroup">
12+
<annotations>
13+
<description>Clicks 'Add to Cart' on a Storefront Bundled Product page.</description>
14+
</annotations>
15+
16+
<waitForPageLoad stepKey="waitForPageLoad"/>
17+
<waitForElementVisible selector="{{StorefrontBundleProductActionSection.addToCartButton}}" stepKey="waitForAddToCartButton"/>
18+
<click selector="{{StorefrontBundleProductActionSection.addToCartButton}}" stepKey="clickOnAddToCartButton"/>
19+
</actionGroup>
20+
</actionGroups>

app/code/Magento/Bundle/Test/Mftf/Section/BundleStorefrontSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<element name="bundleOptionSelection" type="checkbox" selector="//div[@class='nested options-list']/div[{{optionNumber}}]/label[@class='label']" parameterized="true"/>
1515
<!--Description-->
1616
<!--CE exclusively-->
17-
<element name="longDescriptionText" type="text" selector="//*[@id='description']/div/div" timeout="30"/>
18-
<element name="shortDescriptionText" type="text" selector="//div[@class='product attribute overview']" timeout="30"/>
17+
<element name="longDescriptionText" type="text" selector="#description>div>div" timeout="30"/>
18+
<element name="shortDescriptionText" type="text" selector="div.product.attribute.overview" timeout="30"/>
1919
<!--NameOfProductOnProductPage-->
2020
<element name="bundleProductName" type="text" selector="//*[@id='maincontent']//span[@itemprop='name']"/>
2121
<!--PageNotFoundErrorMessage-->

app/code/Magento/Bundle/Test/Mftf/Section/StorefrontBundledSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<element name="updateCart" type="button" selector="#product-updatecart-button" timeout="30"/>
1818
<element name="configuredPrice" type="block" selector=".price-configured_price .price"/>
1919
<element name="fixedPricing" type="text" selector="//div[@class='price-box price-final_price']//span[@id]//..//span[contains(text(),'{{var1}}')]" parameterized="true"/>
20-
<element name="customizeProduct" type="button" selector="//*[@id='bundle-slide']"/>
20+
<element name="customizeProduct" type="button" selector="#bundle-slide"/>
2121
<element name="customizableBundleItemOption" type="text" selector="//div[@class='field choice'][1]//input[@type='checkbox']"/>
2222
<element name="customizableBundleItemOption2" type="text" selector="//div[@class='field choice'][2]//input[@type='checkbox']"/>
2323
<element name="nthOptionDiv" type="block" selector="#product-options-wrapper div.field.option:nth-of-type({{var}})" parameterized="true"/>
@@ -38,5 +38,6 @@
3838
<element name="currencyTrigger" type="select" selector="#switcher-currency-trigger" timeout="30"/>
3939
<element name="currency" type="select" selector="//a[text()='{{arg}}']" parameterized="true"/>
4040
<element name="multiSelectOption" type="select" selector="//div[@class='field option required']//select"/>
41+
<element name="validationMessageBox" type="block" selector="#validation-message-box"/>
4142
</section>
4243
</sections>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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="StorefrontBundleCheckBoxOptionValidationTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Bundle product validation before add to cart"/>
15+
<title value="Customer should be able to see only one validation message for checkbox option group"/>
16+
<description value="Customer should be able to see only one validation message for checkbox option group"/>
17+
<testCaseId value="MC-35133"/>
18+
<severity value="MINOR"/>
19+
<group value="Bundle"/>
20+
</annotations>
21+
<before>
22+
<createData entity="ApiProductWithDescription" stepKey="simpleProduct1" before="bundleProduct"/>
23+
<createData entity="ApiProductWithDescription" stepKey="simpleProduct2" after="simpleProduct1"/>
24+
<createData entity="ApiBundleProduct" stepKey="bundleProduct"/>
25+
<createData entity="CheckboxOption" stepKey="checkboxBundleOption">
26+
<requiredEntity createDataKey="bundleProduct"/>
27+
</createData>
28+
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
29+
<requiredEntity createDataKey="bundleProduct"/>
30+
<requiredEntity createDataKey="checkboxBundleOption"/>
31+
<requiredEntity createDataKey="simpleProduct1"/>
32+
<field key="qty">2</field>
33+
</createData>
34+
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
35+
<requiredEntity createDataKey="bundleProduct"/>
36+
<requiredEntity createDataKey="checkboxBundleOption"/>
37+
<requiredEntity createDataKey="simpleProduct2"/>
38+
<field key="qty">4</field>
39+
</createData>
40+
<magentoCron stepKey="runCronIndex" groups="index"/>
41+
</before>
42+
<after>
43+
<deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/>
44+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
45+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
46+
</after>
47+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductStorefront">
48+
<argument name="productUrl" value="$$bundleProduct.custom_attributes[url_key]$$"/>
49+
</actionGroup>
50+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="customizeBundleProduct"/>
51+
<actionGroup ref="StorefrontAddToTheCartButtonActionGroup" stepKey="addToCartBundleProduct"/>
52+
<actionGroup ref="AssertStorefrontBundleValidationMessagesCountActionGroup" stepKey="assertBundleValidationCount"/>
53+
<actionGroup ref="AssertStorefrontBundleValidationMessageActionGroup" stepKey="assertBundleValidationMessage">
54+
<argument name="message" value="Please select one of the options."/>
55+
</actionGroup>
56+
</test>
57+
</tests>

0 commit comments

Comments
 (0)