Skip to content

Commit 5b1c168

Browse files
Merge branch '2.4-develop' of github.com:magento-commerce/magento2ce into ACPT-488-ACPT-489-ACPT-490
2 parents 1c9c36c + ffc08c4 commit 5b1c168

File tree

49 files changed

+3321
-88
lines changed

Some content is hidden

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

49 files changed

+3321
-88
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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="AdminFilterProductListByBundleProductInDutchUserLanguageTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Admin list bundle products when user language is set as Dutch"/>
15+
<title value="Admin should be able to filter product list by type = Bundle Product, when user language is set as Dutch"/>
16+
<description value="Admin should be able to filter product list by type = Bundle Product
17+
wherein the tier price for the bundle product should be set and user language set as Dutch"/>
18+
<severity value="CRITICAL"/>
19+
</annotations>
20+
<before>
21+
<createData entity="SimpleProduct2" stepKey="createProductForBundleItem1">
22+
<field key="price">100.00</field>
23+
</createData>
24+
<createData entity="SimpleProduct2" stepKey="createProductForBundleItem2">
25+
<field key="price">100.00</field>
26+
</createData>
27+
<!-- Enable Changing Locale to Dutch -->
28+
<magentoCLI command="setup:static-content:deploy" arguments="-f nl_NL" stepKey="staticDeployAfterChangeLocaleToNL"/>
29+
<magentoCron groups="index" stepKey="runCronIndex"/>
30+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
31+
</before>
32+
<after>
33+
<deleteData createDataKey="createProductForBundleItem1" stepKey="deleteProductForBundleItem1"/>
34+
<deleteData createDataKey="createProductForBundleItem2" stepKey="deleteProductForBundleItem2"/>
35+
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteBundle">
36+
<argument name="product" value="BundleProduct"/>
37+
</actionGroup>
38+
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearProductsGridFilters"/>
39+
<comment userInput="BIC workaround" stepKey="waitForClearProductsGridFilters"/>
40+
<!-- Change Admin locale to default -->
41+
<actionGroup ref="SetAdminAccountActionGroup" stepKey="setAdminAccountToDefault">
42+
<argument name="InterfaceLocaleByValue" value="en_US" />
43+
</actionGroup>
44+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
45+
</after>
46+
47+
<!-- Change Admin locale to Nederlands (Nederland) / Nederlands (Nederland) -->
48+
<actionGroup ref="SetAdminAccountActionGroup" stepKey="setAdminAccountToDutch">
49+
<argument name="InterfaceLocaleByValue" value="nl_NL" />
50+
</actionGroup>
51+
52+
<!--Create bundle product-->
53+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage">
54+
<argument name="attributeSetId" value="{{BundleProduct.set}}"/>
55+
<argument name="productType" value="{{BundleProduct.type}}"/>
56+
</actionGroup>
57+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreatePageToLoad"/>
58+
<click selector="{{AdminProductFormBundleSection.dynamicSkuToggle}}" stepKey="disableDynamicSku"/>
59+
<click selector="{{AdminProductFormBundleSection.dynamicPrice}}" stepKey="clickDynamicPriceSwitcher"/>
60+
<fillField selector="{{AdminProductFormBundleSection.priceField}}" userInput="100" stepKey="fillBundlePrice"/>
61+
<actionGroup ref="FillMainBundleProductFormActionGroup" stepKey="fillMainFieldsForBundle"/>
62+
<actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOption1">
63+
<argument name="x" value="0"/>
64+
<argument name="n" value="1"/>
65+
<argument name="prodOneSku" value="$createProductForBundleItem1.sku$"/>
66+
<argument name="prodTwoSku" value=""/>
67+
<argument name="optionTitle" value="Option1"/>
68+
<argument name="inputType" value="checkbox"/>
69+
</actionGroup>
70+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYPrice('0', '0')}}" userInput="100" stepKey="fillBundleOption1Price"/>
71+
<selectOption selector="{{AdminProductFormBundleSection.bundlePriceType}}" userInput="Percent" stepKey="selectPercentPrice"/>
72+
<actionGroup ref="AddBundleOptionWithOneProductActionGroup" stepKey="addBundleOption2">
73+
<argument name="x" value="1"/>
74+
<argument name="n" value="2"/>
75+
<argument name="prodOneSku" value="$createProductForBundleItem2.sku$"/>
76+
<argument name="prodTwoSku" value=""/>
77+
<argument name="optionTitle" value="Option2"/>
78+
<argument name="inputType" value="checkbox"/>
79+
</actionGroup>
80+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYPrice('1', '0')}}" userInput="100" stepKey="fillBundleOption2Price"/>
81+
<scrollToTopOfPage stepKey="scrollToTopOfTheProductPage"/>
82+
<actionGroup ref="AdminBundleProductSetAdvancedPricingActionGroup" stepKey="addProductTierPrice">
83+
<argument name="quantity" value="1"/>
84+
<argument name="price" value="Discount"/>
85+
<argument name="amount" value="50"/>
86+
<argument name="priceView" value="As Low as"/>
87+
</actionGroup>
88+
89+
<!--Save the product-->
90+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
91+
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>
92+
93+
<!--Apply Bundle Product Filter-->
94+
<!--Clear Filters-->
95+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="ClearFilters"/>
96+
97+
<!--Setting filter-->
98+
<actionGroup ref="BundleProductFilter" stepKey="FilterForOnlyBundleProducts"/>
99+
100+
<!--Testing application of filter-->
101+
<see selector="{{AdminProductFiltersSection.productType('0')}}" userInput="Bundle Product" stepKey="correcType0"/>
102+
<dontSeeElement selector="{{AdminProductFiltersSection.AllProductsNotOfBundleType}}" stepKey="checkingRowsForIncorrectType"/>
103+
</test>
104+
</tests>

app/code/Magento/Bundle/Ui/DataProvider/Product/Modifier/SpecialPriceAttributes.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
*/
2020
class SpecialPriceAttributes implements ModifierInterface
2121
{
22+
public const LOCALE_USING_DECIMAL_COMMA = ['nl_BE', 'nl_NL'];
23+
2224
/**
2325
* @var ResolverInterface
2426
*/
@@ -73,6 +75,9 @@ public function modifyData(array $data): array
7375
['display' => CurrencyData::NO_SYMBOL],
7476
false
7577
);
78+
if (in_array($this->localeResolver->getLocale(), self::LOCALE_USING_DECIMAL_COMMA)) {
79+
$item[$priceAttribute] = str_replace(['.',','], ['','.'], $item[$priceAttribute]);
80+
}
7681
$item[$priceAttribute] = $numberFormatter->format($item[$priceAttribute] / 100);
7782
}
7883
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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="AdminCreateCustomGroupInAnAttributeSetActionGroup">
12+
<annotations>
13+
<description> Admin Create Custom Group In An Attribute Set</description>
14+
</annotations>
15+
16+
<arguments>
17+
<argument name="name" type="string"/>
18+
<argument name="customGroupName" type="string"/>
19+
</arguments>
20+
<amOnPage url="{{AdminProductAttributeSetGridPage.url}}" stepKey="goToAttributeSetPage"/>
21+
<click selector="{{AdminProductAttributeSetGridSection.resetFilter}}" stepKey="clickResetButton"/>
22+
<fillField selector="{{AdminProductAttributeSetGridSection.filter}}" userInput="{{name}}" stepKey="filterByName"/>
23+
<click selector="{{AdminProductAttributeSetGridSection.searchBtn}}" stepKey="clickSearch"/>
24+
<click selector="{{AdminProductAttributeSetGridSection.nthRow('1')}}" stepKey="clickFirstRow"/>
25+
<waitForPageLoad stepKey="waitForClickNewButton"/>
26+
<click selector="{{AdminProductAttributeSetEditSection.AddNewGroup}}" stepKey="clickAddNew"/>
27+
<waitForPageLoad stepKey="waitForFillname"/>
28+
<fillField userInput="" selector="{{AdminProductAttributeSetEditSection.newGroupName}}" stepKey="fillName"/>
29+
<waitForPageLoad stepKey="waitForClickOk"/>
30+
<click selector="{{AdminProductAttributeSetEditSection.buttonOk}}" stepKey="clickOk"/>
31+
<see userInput="This is a required field." selector="{{AdminProductAttributeSetEditSection.errorLabel}}" stepKey="seeErrorMessage"/>
32+
<fillField userInput="{{customGroupName}}" selector="{{AdminProductAttributeSetEditSection.newGroupName}}" stepKey="fillCustomGroupName"/>
33+
<click selector="{{AdminProductAttributeSetEditSection.buttonOk}}" stepKey="clickButtonOk"/>
34+
<click selector="{{AdminProductAttributeSetActionSection.save}}" stepKey="clickSave"/>
35+
<see userInput="You saved the attribute set" selector="{{AdminMessagesSection.success}}" stepKey="successMessage"/>
36+
37+
</actionGroup>
38+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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="AdminDeleteCustomGroupDragAndDropAttributesInAnAttributeSetActionGroup">
12+
<annotations>
13+
<description> Admin Delete Custom Group In An Attribute Set</description>
14+
</annotations>
15+
16+
<arguments>
17+
<argument name="name" type="string"/>
18+
<argument name="customGroupName" type="string"/>
19+
</arguments>
20+
<amOnPage url="{{AdminProductAttributeSetGridPage.url}}" stepKey="goToAttributeSetPage"/>
21+
<click selector="{{AdminProductAttributeSetGridSection.resetFilter}}" stepKey="clickResetButton"/>
22+
<fillField selector="{{AdminProductAttributeSetGridSection.filter}}" userInput="{{name}}" stepKey="filterByName"/>
23+
<click selector="{{AdminProductAttributeSetGridSection.searchBtn}}" stepKey="clickSearch"/>
24+
<click selector="{{AdminProductAttributeSetGridSection.nthRow('1')}}" stepKey="clickFirstRow"/>
25+
<waitForPageLoad stepKey="waitForSelectCustomGroup"/>
26+
<!-- Delete created custom group -->
27+
<click selector="{{AdminProductAttributeSetEditSection.attributeGroup(customGroupName)}}" stepKey="selectCustomGroup"/>
28+
<click selector="{{AdminProductAttributeSetEditSection.DeleteSelectedGroup}}" stepKey="clickDeleteSelectedGroup"/>
29+
<waitForPageLoad stepKey="waitForAttentionMessage"/>
30+
<seeElement selector="{{AdminProductAttributeSetEditSection.attentionMessage}}" stepKey="assertCustomGroup"/>
31+
<click selector="{{AdminProductAttributeSetEditSection.buttonOk}}" stepKey="clickOk"/>
32+
<waitForPageLoad stepKey="waitForDragAndDropAttributes"/>
33+
<dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('price')}}" selector2="{{AdminProductAttributeSetEditSection.attributeGroup('Product Details')}}" stepKey="dragAndDrop3"/>
34+
<dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('sku')}}" selector2="{{AdminProductAttributeSetEditSection.attributeGroup('Product Details')}}" stepKey="dragAndDrop4"/>
35+
<click selector="{{AdminProductAttributeSetEditSection.attributeGroup('Custom Group')}}" stepKey="selectCustomGroup1"/>
36+
<click selector="{{AdminProductAttributeSetEditSection.DeleteSelectedGroup}}" stepKey="deleteSelectedGroup1"/>
37+
<waitForPageLoad stepKey="waitForClickSave"/>
38+
<click selector="{{AdminProductAttributeSetActionSection.save}}" stepKey="clickSave"/>
39+
<see userInput="You saved the attribute set" selector="{{AdminMessagesSection.success}}" stepKey="successMessage"/>
40+
41+
</actionGroup>
42+
</actionGroups>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
<element name="xThLineItemUnassignedAttribute" type="text" selector="//*[@id='tree-div2']//li[{{x}}]//a/span" parameterized="true"/>
2525
<!-- Buttons -->
2626
<element name="AddNewGroup" type="button" selector="button[data-ui-id='adminhtml-catalog-product-set-edit-add-group-button']"/>
27+
<element name="DeleteSelectedGroup" type="button" selector="button[data-ui-id='adminhtml-catalog-product-set-edit-delete-group-button']"/>
2728
<!-- Modal Window Add New Group -->
2829
<element name="newGroupName" type="input" selector="input[data-role='promptField']"/>
2930
<element name="buttonOk" type="button" selector=".modal-footer .action-primary.action-accept"/>
3031
<element name="errorLabel" type="text" selector="label.mage-error"/>
32+
<element name="attentionMessage" type="text" selector="(//div[@class='modal-inner-wrap'])[2]//div[contains(text(),'This group')]"/>
3133
</section>
3234
</sections>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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="AdminAlertDoseNotAppearOnProductPageTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Product Page"/>
15+
<title value="Admin Observe alert does not appear on Products page"/>
16+
<description value="Admin should be able to create multiple products"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-28810"/>
19+
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
23+
</before>
24+
25+
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="goToCategoryPage"/>
26+
<actionGroup ref="CreateCategoryActionGroup" stepKey="createCategory">
27+
<argument name="categoryEntity" value="_defaultCategory"/>
28+
</actionGroup>
29+
30+
<actionGroup ref="AdminCreateSimpleProductActionGroup" stepKey="createProduct1">
31+
<argument name="category" value="_defaultCategory"/>
32+
<argument name="simpleProduct" value="SimpleProduct"/>
33+
</actionGroup>
34+
35+
<actionGroup ref="AdminCreateSimpleProductActionGroup" stepKey="createProduct2">
36+
<argument name="category" value="_defaultCategory"/>
37+
<argument name="simpleProduct" value="SimpleProduct2"/>
38+
</actionGroup>
39+
40+
<dontSeeElement selector="{{AdminCategoryBasicFieldSection.urlExistsErrorMessage}}" stepKey="validateSameErrorMessages"/>
41+
42+
<after>
43+
<actionGroup ref="DeleteProductActionGroup" stepKey="deleteSimpleProduct">
44+
<argument name="productName" value="SimpleProduct.name"/>
45+
</actionGroup>
46+
<actionGroup ref="DeleteProductActionGroup" stepKey="deleteSimpleProduct2">
47+
<argument name="productName" value="SimpleProduct2.name"/>
48+
</actionGroup>
49+
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="goToCategoryPage"/>
50+
<actionGroup ref="DeleteCategoryActionGroup" stepKey="deleteCategory">
51+
<argument name="categoryEntity" value="_defaultCategory"/>
52+
</actionGroup>
53+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
54+
</after>
55+
</test>
56+
</tests>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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="AdminDeleteCustomGroupInAnAttributeSetTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Delete Custom Group In An attribute set "/>
15+
<title value="Delete Custom Group from attribute set"/>
16+
<description value="Delete Custom Group from attribute set"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-26728"/>
19+
<group value="catalog"/>
20+
</annotations>
21+
22+
<before>
23+
24+
<!-- Login to Admin -->
25+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
26+
<!-- Create attribute set with custom group -->
27+
<createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/>
28+
<actionGroup ref="AdminCreateCustomGroupInAnAttributeSetActionGroup" stepKey="createGroupInAttributeSet">
29+
<argument name="name" value="$$createAttributeSet.attribute_set_name$$"/>
30+
<argument name="customGroupName" value="Custom Group"/>
31+
</actionGroup>
32+
<actionGroup ref="GoToAttributeSetByNameActionGroup" stepKey="OpenAttributeSet">
33+
<argument name="name" value="$$createAttributeSet.attribute_set_name$$"/>
34+
</actionGroup>
35+
<waitForPageLoad stepKey="waitForDragAndDropAttributes"/>
36+
<!-- Drag and drop system product attributes in to custom group -->
37+
<dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('price')}}" selector2="{{AdminProductAttributeSetEditSection.attributeGroupExtender(customGroup.name)}}" stepKey="dragAndDrop"/>
38+
<dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('sku')}}" selector2="{{AdminProductAttributeSetEditSection.attributeGroupExtender(customGroup.name)}}" stepKey="dragAndDrop1"/>
39+
<!-- Click Save Attribute -->
40+
<actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttribute"/>
41+
42+
</before>
43+
44+
<after>
45+
46+
<!-- Delete attribute set -->
47+
<deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/>
48+
<!-- Logout from Admin -->
49+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
50+
51+
</after>
52+
<!-- Open attribute set and delete custom group -->
53+
<actionGroup ref="AdminDeleteCustomGroupDragAndDropAttributesInAnAttributeSetActionGroup" stepKey="deleteGroupInAttributeSet">
54+
<argument name="name" value="$$createAttributeSet.attribute_set_name$$"/>
55+
<argument name="customGroupName" value="Custom Group"/>
56+
</actionGroup>
57+
58+
<!-- Again open attribute set and search for custom group -->
59+
<actionGroup ref="GoToAttributeSetByNameActionGroup" stepKey="searchAttribute1">
60+
<argument name="name" value="$$createAttributeSet.attribute_set_name$$"/>
61+
</actionGroup>
62+
<!-- Custom Group is absent in attribute set -->
63+
<dontSeeElement selector="{{AdminProductAttributeSetEditSection.attributeGroup('Custom Group')}}" stepKey="assertCustomGroupIsNotPresent"/>
64+
<!-- Navigate to Catalog > Products -->
65+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="amOnProductPage"/>
66+
<!-- Start to create a new simple product with the custom attribute set from the preconditions -->
67+
<click selector="{{AdminProductGridActionSection.addProductBtn}}" stepKey="clickAddProduct"/>
68+
<waitForPageLoad stepKey="waitForSelectAttribute"/>
69+
<actionGroup ref="AdminProductPageSelectAttributeSetActionGroup" stepKey="selectAttribute">
70+
<argument name="attributeSetName" value="$$createAttributeSet.attribute_set_name$$"/>
71+
</actionGroup>
72+
<!-- Custom Group is absent in attribute set -->
73+
<dontSeeElement selector="{{AdminProductAttributeSection.attributeGroupByName('Custom Group')}}" stepKey="dontSeeCustomGroup"/>
74+
75+
</test>
76+
</tests>
77+

0 commit comments

Comments
 (0)