Skip to content

Commit b8b4827

Browse files
Merge branch 'ACQE-4705_1' into ACQE-6651_mainline_PR_deployment
2 parents 2c71c6a + a526ce3 commit b8b4827

14 files changed

+468
-1
lines changed
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="StorefrontAddQuantityOnProductPageActionGroup">
12+
<annotations>
13+
<description>On Storefront product page add quantity.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="quantity" type="string" defaultValue="1"/>
17+
</arguments>
18+
19+
<waitForElementVisible selector="{{StorefrontProductPageSection.qtyInput}}" stepKey="waitForQtyToBeVisible"/>
20+
<fillField userInput="{{quantity}}" selector="{{StorefrontProductPageSection.qtyInput}}" stepKey="fillProductQty"/>
21+
</actionGroup>
22+
</actionGroups>
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="StorefrontAddSimpleProductCustomOptionCheckBoxActionGroup">
12+
<annotations>
13+
<description>Adding simple product to cart with custom options checkbox.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="checkBoxValue" type="string" defaultValue="Value1"/>
17+
</arguments>
18+
19+
<waitForElementClickable selector="{{StorefrontProductInfoMainSection.customOptionCheckBox(checkBoxValue)}}" stepKey="waitForOptionCheckbox"/>
20+
<checkOption selector="{{StorefrontProductInfoMainSection.customOptionCheckBox(checkBoxValue)}}" stepKey="checkCustomCheckBox"/>
21+
</actionGroup>
22+
</actionGroups>
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="StorefrontAddSimpleProductCustomOptionDropDownActionGroup">
12+
<annotations>
13+
<description>Adding simple product to cart with custom options dropdown.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="dropDownOption" type="string" defaultValue="Value1 +$10.00"/>
17+
</arguments>
18+
19+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.selectCustomOptionDropDown}}" stepKey="waitForOptionDropDown"/>
20+
<selectOption selector="{{StorefrontProductInfoMainSection.selectCustomOptionDropDown}}" userInput="{{dropDownOption}}" stepKey="clickOptionValueDropDown"/>
21+
</actionGroup>
22+
</actionGroups>
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="StorefrontAddSimpleProductCustomOptionFieldActionGroup">
12+
<annotations>
13+
<description>Adding simple product to cart with custom option field.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="testValue" type="string" defaultValue="Test value"/>
17+
</arguments>
18+
19+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.customOptionField}}" stepKey="waitForCustomOptionFieldToBeVisible"/>
20+
<fillField selector="{{StorefrontProductInfoMainSection.customOptionField}}" userInput="{{testValue}}" stepKey="fillCustomOptionField"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="StorefrontCloseMiniCartActionGroup">
12+
<annotations>
13+
<description>On Storefront closing mini cart popup.</description>
14+
</annotations>
15+
16+
<waitForElementClickable selector="{{StorefrontMinicartSection.minicartclose}}" stepKey="waitForMiniCartButtonToBeClickable"/>
17+
<click selector="{{StorefrontMinicartSection.minicartclose}}" stepKey="clickOnClose"/>
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,4 +1531,11 @@
15311531
<data key="weight">1</data>
15321532
<data key="price">10</data>
15331533
</entity>
1534+
<entity name="productWithMultiCustomOption" type="product">
1535+
<var key="sku" entityType="product" entityKey="sku" />
1536+
<data key="file">magento.jpg</data>
1537+
<requiredEntity type="product_option">ProductOptionDropDownFor2</requiredEntity>
1538+
<requiredEntity type="product_option">ProductOptionCheckboxFor2</requiredEntity>
1539+
<requiredEntity type="product_option">ProductOptionNewField</requiredEntity>
1540+
</entity>
15341541
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/ProductOptionData.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,29 @@
195195
<data key="price">250</data>
196196
<data key="price_type">fixed</data>
197197
</entity>
198+
<entity name="ProductOptionNewField" extends="ProductOptionField">
199+
<data key="title">Option 3</data>
200+
<data key="type">field</data>
201+
<data key="is_require">false</data>
202+
<data key="price">50</data>
203+
<data key="price_type">fixed</data>
204+
</entity>
205+
<entity name="ProductOptionDropDownFor2" type="product_option">
206+
<var key="product_sku" entityType="product" entityKey="sku" />
207+
<data key="title">Option 1</data>
208+
<data key="type">drop_down</data>
209+
<data key="sort_order">0</data>
210+
<data key="is_require">true</data>
211+
<requiredEntity type="product_option_value">ProductValueDropdown1</requiredEntity>
212+
<requiredEntity type="product_option_value">ProductValueDropdown2</requiredEntity>
213+
</entity>
214+
<entity name="ProductOptionCheckboxFor2" type="product_option">
215+
<var key="product_sku" entityType="product" entityKey="sku" />
216+
<data key="title">Option 2</data>
217+
<data key="type">checkbox</data>
218+
<data key="sort_order">0</data>
219+
<data key="is_require">true</data>
220+
<requiredEntity type="product_option_value">ProductValueCheckbox1</requiredEntity>
221+
<requiredEntity type="product_option_value">ProductValueCheckbox2</requiredEntity>
222+
</entity>
198223
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/ProductOptionValueData.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,28 @@
101101
<data key="price_type">fixed</data>
102102
<data key="sku">product_option_value_sku_dropdown_2_</data>
103103
</entity>
104+
<entity name="ProductValueDropdown1" type="product_option_value">
105+
<data key="title">Value1</data>
106+
<data key="sort_order">1</data>
107+
<data key="price">10</data>
108+
<data key="price_type">fixed</data>
109+
</entity>
110+
<entity name="ProductValueDropdown2" type="product_option_value">
111+
<data key="title">Value2</data>
112+
<data key="sort_order">1</data>
113+
<data key="price">20</data>
114+
<data key="price_type">fixed</data>
115+
</entity>
116+
<entity name="ProductValueCheckbox1" type="product_option_value">
117+
<data key="title">Value1</data>
118+
<data key="sort_order">1</data>
119+
<data key="price">25</data>
120+
<data key="price_type">percent</data>
121+
</entity>
122+
<entity name="ProductValueCheckbox2" type="product_option_value">
123+
<data key="title">Value2</data>
124+
<data key="sort_order">1</data>
125+
<data key="price">50</data>
126+
<data key="price_type">percent</data>
127+
</entity>
104128
</entities>

app/code/Magento/Catalog/Test/Mftf/Data/TierPriceData.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,18 @@
100100
<data key="customer_group">General</data>
101101
<data key="quantity">3</data>
102102
</entity>
103+
<entity name="tierPriceForSimpleProduct" type="data">
104+
<data key="website">All Websites [USD]</data>
105+
<data key="customer_group">ALL GROUPS</data>
106+
<data key="price">70.00</data>
107+
<data key="qty">10</data>
108+
</entity>
103109
<entity name="tierPriceForSimpleProduct" type="catalogTierPrice">
104110
<data key="price">9.99</data>
105111
<data key="price_type">fixed</data>
106112
<data key="website_id">0</data>
107113
<data key="customer_group">ALL GROUPS</data>
108114
<data key="quantity">1</data>
109-
<var key="sku" entityType="product" entityKey="sku" />
115+
<var key="sku" entityType="product" entityKey="sku"/>
110116
</entity>
111117
</entities>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,6 @@
113113
<element name="customOptionDayPart" type="date" selector="//div[@class='field date required']//span[text()='{{option}}']/../..//div/select[@data-calendar-role='day_part']" parameterized="true"/>
114114
<element name="swatchOptionDisabled" type="text" selector=".//*[@class='swatch-option color disabled']"/>
115115
<element name="addToCartEnabled" type="button" selector="#product-addtocart-button:not([disabled])"/>
116+
<element name="selectCustomOptionDropDown" type="select" selector="//select[contains(@class,' required product-custom-option admin__control-select')]"/>
116117
</section>
117118
</sections>

0 commit comments

Comments
 (0)