Skip to content

Commit f63c6f5

Browse files
merge magento/2.4-develop into magento-obsessive-owls/543_product-attributes-default-sorting-order
2 parents d5e8826 + 1452016 commit f63c6f5

12 files changed

+290
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="AdminBundleProductSetAdvancedPricingActionGroup" extends="ProductSetAdvancedPricingActionGroup">
12+
<annotations>
13+
<description>Sets the provided Advanced Pricing on the Admin Bundle Product creation/edit page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="priceView" type="string" defaultValue="Price Range"/>
17+
</arguments>
18+
<remove keyForRemoval="selectProductCustomGroupValue"/>
19+
<selectOption selector="{{AdminProductFormAdvancedPricingSection.bundleAdvancedPriceView}}" userInput="{{priceView}}" stepKey="selectPriceView" before="clickDoneButton"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminProductFormAdvancedPricingSection">
12+
<element name="bundleAdvancedPriceView" type="select" selector="div[data-index='advanced-pricing'] select[name='product[price_view]']"/>
13+
</section>
14+
</sections>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<element name="bundleOptionXInputType" type="select" selector="[name='bundle_options[bundle_options][{{x}}][type]']" parameterized="true"/>
2121
<element name="bundleOptionXRequired" type="checkbox" selector="[name='bundle_options[bundle_options][{{x}}][required]']" parameterized="true"/>
2222
<element name="bundleOptionXProductYQuantity" type="input" selector="[name='bundle_options[bundle_options][{{x}}][bundle_selections][{{y}}][selection_qty]']" parameterized="true"/>
23+
<element name="bundleOptionXProductYPrice" type="input" selector="[name='bundle_options[bundle_options][{{x}}][bundle_selections][{{y}}][selection_price_value]']" parameterized="true"/>
2324
<element name="addProductsToOption" type="button" selector="[data-index='modal_set']" timeout="30"/>
2425
<element name="nthAddProductsToOption" type="button" selector="//tr[{{var}}]//button[@data-index='modal_set']" timeout="30" parameterized="true"/>
2526
<element name="bundlePriceType" type="select" selector="bundle_options[bundle_options][0][bundle_selections][0][selection_price_type]"/>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<element name="priceTo" type="text" selector=".product-info-price .price-to"/>
1414
<element name="minPrice" type="text" selector="span[data-price-type='minPrice']"/>
1515
<element name="maxPrice" type="text" selector="span[data-price-type='minPrice']"/>
16+
<element name="asLowAsFinalPrice" type="text" selector="div.price-box.price-final_price p.minimal-price > span.price-final_price span.price"/>
17+
<element name="fixedFinalPrice" type="text" selector="div.price-box.price-final_price > span.price-final_price span.price"/>
1618
<element name="productBundleOptionsCheckbox" type="checkbox" selector="//*[@id='product-options-wrapper']//div[@class='fieldset']//label[contains(.,'{{childName}}')]/../input" parameterized="true" timeout="30"/>
1719
</section>
1820
</sections>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="BundleProductWithDynamicTierPriceInCartTest" extends="BundleProductWithTierPriceWithFixedAndPercentOptionsInCartTest">
11+
<annotations>
12+
<stories value="Add bundle product to cart on storefront"/>
13+
<title value="Customer should get the right subtotal in cart when the bundle product with dynamic tier price added to the cart"/>
14+
<description value="Customer should be able to add bundle product with dynamic tier price to the cart and get the right price"/>
15+
<severity value="CRITICAL"/>
16+
</annotations>
17+
18+
<before>
19+
<createData entity="VirtualProduct" stepKey="createProductForBundleItem1">
20+
<field key="price">50.00</field>
21+
</createData>
22+
<createData entity="SimpleProduct2" stepKey="createProductForBundleItem2">
23+
<field key="price">100.00</field>
24+
</createData>
25+
</before>
26+
27+
<remove keyForRemoval="clickDynamicPriceSwitcher"/>
28+
<remove keyForRemoval="fillBundlePrice"/>
29+
<remove keyForRemoval="disableDynamicSku"/>
30+
<remove keyForRemoval="fillBundleOption1Price"/>
31+
<remove keyForRemoval="selectPercentPrice"/>
32+
<remove keyForRemoval="fillBundleOption2Price"/>
33+
<assertEquals message="ExpectedPrice" stepKey="assertBundleProductPrice">
34+
<actualResult type="variable">grabProductPrice</actualResult>
35+
<expectedResult type="string">$75.00</expectedResult>
36+
</assertEquals>
37+
<actionGroup ref="AssertSubTotalOnStorefrontMiniCartActionGroup" stepKey="assertSubTotalOnStorefrontMiniCart">
38+
<argument name="subTotal" value="$75.00"/>
39+
</actionGroup>
40+
</test>
41+
</tests>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="BundleProductWithOptionTierPriceInCartTest" extends="BundleProductWithTierPriceWithFixedAndPercentOptionsInCartTest">
11+
<annotations>
12+
<stories value="Add bundle product to cart on storefront"/>
13+
<title value="Customer should get the right subtotal in cart when the bundle product with tier price for sub-item added to the cart"/>
14+
<description value="Customer should be able to add bundle product with tier price for sub-item price to the cart and get the right price"/>
15+
<severity value="CRITICAL"/>
16+
</annotations>
17+
18+
<before>
19+
<createData entity="VirtualProduct" stepKey="createProductForBundleItem1">
20+
<field key="price">50.00</field>
21+
</createData>
22+
<createData entity="SimpleProduct2" stepKey="createProductForBundleItem2">
23+
<field key="price">100.00</field>
24+
</createData>
25+
<createData entity="TierProductPrice50PercentDiscount" stepKey="addTierPrice">
26+
<requiredEntity createDataKey="createProductForBundleItem2"/>
27+
</createData>
28+
</before>
29+
30+
<remove keyForRemoval="clickDynamicPriceSwitcher"/>
31+
<remove keyForRemoval="fillBundlePrice"/>
32+
<remove keyForRemoval="disableDynamicSku"/>
33+
<remove keyForRemoval="fillBundleOption1Price"/>
34+
<remove keyForRemoval="selectPercentPrice"/>
35+
<remove keyForRemoval="fillBundleOption2Price"/>
36+
<remove keyForRemoval="addProductTierPrice"/>
37+
<actionGroup ref="SaveProductFormActionGroup" after="addBundleOption2" stepKey="saveBundleProduct"/>
38+
<grabTextFrom selector="{{StorefrontProductInfoMainSection.fixedFinalPrice}}" stepKey="grabProductPrice"/>
39+
<assertEquals message="ExpectedPrice" stepKey="assertBundleProductPrice">
40+
<actualResult type="variable">grabProductPrice</actualResult>
41+
<expectedResult type="string">$100.00</expectedResult>
42+
</assertEquals>
43+
<actionGroup ref="AssertSubTotalOnStorefrontMiniCartActionGroup" stepKey="assertSubTotalOnStorefrontMiniCart">
44+
<argument name="subTotal" value="$100.00"/>
45+
</actionGroup>
46+
</test>
47+
</tests>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="BundleProductWithTierPriceWithFixedAndPercentOptionsInCartTest">
11+
<annotations>
12+
<features value="Bundle"/>
13+
<stories value="Add bundle product to cart on storefront"/>
14+
<title value="Customer should get the right subtotal in cart when the bundle product with tier price and bundle items with fixed and percent price added to the cart"/>
15+
<description value="Customer should be able to add bundle product with tier price and bundle items with fixed and percent price to the cart and get the right price"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-26543"/>
18+
<group value="bundle"/>
19+
<group value="catalog"/>
20+
</annotations>
21+
22+
<before>
23+
<createData entity="SimpleProduct2" stepKey="createProductForBundleItem1">
24+
<field key="price">100.00</field>
25+
</createData>
26+
<createData entity="SimpleProduct2" stepKey="createProductForBundleItem2">
27+
<field key="price">100.00</field>
28+
</createData>
29+
<magentoCron groups="index" stepKey="runCronIndex"/>
30+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
31+
</before>
32+
33+
<after>
34+
<deleteData createDataKey="createProductForBundleItem1" stepKey="deleteProductForBundleItem1"/>
35+
<deleteData createDataKey="createProductForBundleItem2" stepKey="deleteProductForBundleItem2"/>
36+
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteBundle">
37+
<argument name="product" value="BundleProduct"/>
38+
</actionGroup>
39+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductsGridFilters"/>
40+
<waitForPageLoad stepKey="waitForClearProductsGridFilters"/>
41+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
42+
</after>
43+
44+
<amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/>
45+
<waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/>
46+
<click selector="{{AdminProductFormBundleSection.dynamicSkuToggle}}" stepKey="disableDynamicSku"/>
47+
<click selector="{{AdminProductFormBundleSection.dynamicPrice}}" stepKey="clickDynamicPriceSwitcher"/>
48+
<fillField selector="{{AdminProductFormBundleSection.priceField}}" userInput="100" stepKey="fillBundlePrice"/>
49+
<actionGroup ref="FillMainBundleProductFormActionGroup" stepKey="fillMainFieldsForBundle"/>
50+
<actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOption1">
51+
<argument name="x" value="0"/>
52+
<argument name="n" value="1"/>
53+
<argument name="prodOneSku" value="$createProductForBundleItem1.sku$"/>
54+
<argument name="prodTwoSku" value=""/>
55+
<argument name="optionTitle" value="Option1"/>
56+
<argument name="inputType" value="checkbox"/>
57+
</actionGroup>
58+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYPrice('0', '0')}}" userInput="100" stepKey="fillBundleOption1Price"/>
59+
<selectOption selector="{{AdminProductFormBundleSection.bundlePriceType}}" userInput="Percent" stepKey="selectPercentPrice"/>
60+
<actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOption2">
61+
<argument name="x" value="1"/>
62+
<argument name="n" value="2"/>
63+
<argument name="prodOneSku" value="$createProductForBundleItem2.sku$"/>
64+
<argument name="prodTwoSku" value=""/>
65+
<argument name="optionTitle" value="Option2"/>
66+
<argument name="inputType" value="checkbox"/>
67+
</actionGroup>
68+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYPrice('1', '0')}}" userInput="100" stepKey="fillBundleOption2Price"/>
69+
<scrollToTopOfPage stepKey="scrollToTopOfTheProductPage"/>
70+
<actionGroup ref="AdminBundleProductSetAdvancedPricingActionGroup" stepKey="addProductTierPrice">
71+
<argument name="quantity" value="1"/>
72+
<argument name="price" value="Discount"/>
73+
<argument name="amount" value="50"/>
74+
<argument name="priceView" value="As Low as"/>
75+
</actionGroup>
76+
<amOnPage url="{{StorefrontProductPage.url(BundleProduct.urlKey)}}" stepKey="goToStorefront"/>
77+
<waitForPageLoad stepKey="waitForStorefront"/>
78+
<!--Assert Bundle Product Price-->
79+
<grabTextFrom selector="{{StorefrontProductInfoMainSection.asLowAsFinalPrice}}" stepKey="grabProductPrice"/>
80+
<assertEquals message="ExpectedPrice" stepKey="assertBundleProductPrice">
81+
<actualResult type="variable">grabProductPrice</actualResult>
82+
<expectedResult type="string">$150.00</expectedResult>
83+
</assertEquals>
84+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickOnCustomizeAndAddToCartButton"/>
85+
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart">
86+
<argument name="quantity" value="1"/>
87+
</actionGroup>
88+
<actionGroup ref="AssertSubTotalOnStorefrontMiniCartActionGroup" stepKey="assertSubTotalOnStorefrontMiniCart">
89+
<argument name="subTotal" value="$150.00"/>
90+
</actionGroup>
91+
</test>
92+
</tests>

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,12 @@
7272
<data key="quantity">3</data>
7373
<var key="sku" entityType="product" entityKey="sku" />
7474
</entity>
75+
<entity name="TierProductPrice50PercentDiscount" type="catalogTierPrice">
76+
<data key="price">50</data>
77+
<data key="price_type">discount</data>
78+
<data key="website_id">0</data>
79+
<data key="customer_group">ALL GROUPS</data>
80+
<data key="quantity">1</data>
81+
<var key="sku" entityType="product" entityKey="sku" />
82+
</entity>
7583
</entities>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<section name="StorefrontProductActionSection">
1111
<element name="quantity" type="input" selector="#qty"/>
1212
<element name="addToCart" type="button" selector="#product-addtocart-button" timeout="60"/>
13+
<element name="addToCartEnabledWithTranslation" type="button" selector="button#product-addtocart-button[data-translate]:enabled" timeout="60"/>
1314
<element name="addToCartButtonTitleIsAdding" type="text" selector="//button/span[text()='Adding...']"/>
1415
<element name="addToCartButtonTitleIsAdded" type="text" selector="//button/span[text()='Added']"/>
1516
<element name="addToCartButtonTitleIsAddToCart" type="text" selector="//button/span[text()='Add to Cart']"/>

app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
</actionGroup>
5454
<click selector="{{AdminManageSwatchSection.nthUploadFile('1')}}" stepKey="clickUploadFile1"/>
5555
<attachFile selector="input[name='datafile']" userInput="adobe-thumb.jpg" stepKey="attachFile1"/>
56+
<waitForPageLoad stepKey="waitFileAttached1"/>
5657
<fillField selector="{{AdminManageSwatchSection.adminInputByIndex('0')}}" userInput="adobe-thumb" stepKey="fillAdmin1"/>
57-
<click selector="{{AdminManageSwatchSection.swatchWindow('0')}}" stepKey="clicksWatchWindow1"/>
5858

5959
<!-- Set swatch #2 image using the file upload -->
6060
<click selector="{{AdminManageSwatchSection.addSwatch}}" stepKey="clickAddSwatch2"/>
@@ -63,6 +63,7 @@
6363
</actionGroup>
6464
<click selector="{{AdminManageSwatchSection.nthUploadFile('2')}}" stepKey="clickUploadFile2"/>
6565
<attachFile selector="input[name='datafile']" userInput="adobe-small.jpg" stepKey="attachFile2"/>
66+
<waitForPageLoad stepKey="waitFileAttached2"/>
6667
<fillField selector="{{AdminManageSwatchSection.adminInputByIndex('1')}}" userInput="adobe-small" stepKey="fillAdmin2"/>
6768

6869
<!-- Set scope to global -->

0 commit comments

Comments
 (0)