Skip to content

Commit 00a8714

Browse files
MC-3290: Merchant should be able to automatically sort smart category by name
1 parent cea3e79 commit 00a8714

9 files changed

+91
-2
lines changed
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAssertProductsGridIsEmptyActionGroup">
12+
<see selector="{{AdminCategoryProductsGridSection.productsGridEmpty}}" userInput="We couldn't find any records" stepKey="assertGridEmpty"/>
13+
</actionGroup>
14+
</actionGroups>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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="AdminCheckProductIsMissingInCategoryProductsGrid">
12+
<arguments>
13+
<argument name="productName" type="string"/>
14+
</arguments>
15+
<dontSee selector="{{AdminCategoryProductsGridSection.nameColumn}}" userInput="{{productName}}" stepKey="dontSeeProduct"/>
16+
</actionGroup>
17+
<actionGroup name="AdminCheckProductPositionInCategoryProductsGrid">
18+
<arguments>
19+
<argument name="position" type="string"/>
20+
<argument name="productName" type="string"/>
21+
</arguments>
22+
<see selector="{{AdminCategoryProductsGridSection.rowProductName(position)}}" userInput="{{productName}}" stepKey="assertProductPosition"/>
23+
</actionGroup>
24+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<!-- Check Products after sort on Storefront-->
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontCheckProductIsMissingInCategoryProductsPageActionGroup">
12+
<arguments>
13+
<argument name="productName" type="string"/>
14+
</arguments>
15+
<dontSee selector="{{StorefrontCategoryProductSection.ProductTitleByName(productName)}}" stepKey="dontSeeCorrectProductsOnStorefront"/>
16+
</actionGroup>
17+
<actionGroup name="StorefrontCheckProductPositionActionGroup">
18+
<arguments>
19+
<argument name="position" type="string"/>
20+
<argument name="productName" type="string"/>
21+
</arguments>
22+
<see selector="{{StorefrontCategoryProductSection.ProductInfoByNumber(position)}}" userInput="{{productName}}" stepKey="assertProductPosition"/>
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9+
<actionGroup name="StorefrontNavigateCategoryPageActionGroup">
10+
<arguments>
11+
<argument name="category"/>
12+
</arguments>
13+
<!-- Open category page on storefront -->
14+
<amOnPage url="{{StorefrontCategoryPage.url(category.custom_attributes[url_key])}}" stepKey="navigateStorefrontCategoryPage"/>
15+
</actionGroup>
16+
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
<element name="productGridNameProduct" type="text" selector="//table[@id='catalog_category_products_table']//td[contains(., '{{productName}}')]" parameterized="true"/>
1818
<element name="productVisibility" type="select" selector="//*[@name='product[visibility]']"/>
1919
<element name="productSelectAll" type="checkbox" selector="input.admin__control-checkbox"/>
20+
<element name="productsGridEmpty" type="text" selector="#catalog_category_products_table .data-grid-tr-no-data .empty-text"/>
2021
</section>
2122
</sections>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductOutOfStockWithTierPriceTest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@
1919
<group value="mtf_migrated"/>
2020
</annotations>
2121
<before>
22-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2322
<createData entity="SimpleSubCategory" stepKey="categoryEntity"/>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2424
</before>
2525
<after>
2626
<deleteData stepKey="deleteSimpleSubCategory" createDataKey="categoryEntity"/>
27+
<actionGroup ref="deleteProductBySku" stepKey="deleteVirtualProduct">
28+
<argument name="sku" value="{{virtualProductOutOfStock.sku}}"/>
29+
</actionGroup>
30+
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFilter"/>
2731
<actionGroup ref="logout" stepKey="logout"/>
2832
</after>
2933

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@
1919
<group value="mtf_migrated"/>
2020
</annotations>
2121
<before>
22-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2322
<createData entity="SimpleSubCategory" stepKey="categoryEntity"/>
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2424
</before>
2525
<after>
2626
<deleteData stepKey="deleteSimpleSubCategory" createDataKey="categoryEntity"/>
27+
<actionGroup ref="deleteProductBySku" stepKey="deleteVirtualProduct">
28+
<argument name="sku" value="{{virtualProductCustomImportOptions.sku}}"/>
29+
</actionGroup>
30+
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="resetOrderFilter"/>
2731
<actionGroup ref="logout" stepKey="logout"/>
2832
</after>
2933

app/code/Magento/Catalog/Test/Mftf/Test/AdminUnassignProductAttributeFromAttributeSetTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
</before>
3535
<after>
3636
<deleteData createDataKey="attribute" stepKey="deleteAttribute"/>
37+
<deleteData createDataKey="product" stepKey="deleteProduct"/>
3738
<actionGroup ref="logout" stepKey="logout"/>
3839
</after>
3940
<!-- Assert attribute presence in storefront product additional information -->

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@
304304
<amOnPage url="admin/admin/auth/logout/" stepKey="logout"/>
305305
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
306306
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
307+
<deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
307308
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
308309
</after>
309310

0 commit comments

Comments
 (0)