Skip to content

Commit 683ee3c

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop' into 2.4-develop-pr91
2 parents fb2429d + 6cd35e9 commit 683ee3c

File tree

44 files changed

+1528
-162
lines changed

Some content is hidden

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

44 files changed

+1528
-162
lines changed

app/code/Magento/AdminNotification/Test/Mftf/Section/AdminSystemMessagesSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@
1515
<element name="success" type="text" selector="#system_messages div.message-success"/>
1616
<element name="warning" type="text" selector="#system_messages div.message-warning"/>
1717
<element name="notice" type="text" selector="#system_messages div.message-notice"/>
18+
<element name="info" type="text" selector="#system_messages div.message-info"/>
19+
<element name="viewDetailsLink" type="button" selector="//div[contains(@class, 'message-system-short')]/a[contains(text(), 'View Details')]" timeout="30"/>
1820
</section>
1921
</sections>
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+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminBulkDetailsModalSection">
12+
<element name="descriptionValue" type="text" selector="//aside//div[@data-index='description']//span[@name='description']"/>
13+
<element name="summaryValue" type="text" selector="//aside//div[@data-index='summary']//span[@name='summary']" />
14+
<element name="startTimeValue" type="text" selector="//aside//div[@data-index='start_time']//span[@name='start_time']" />
15+
</section>
16+
</sections>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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="AdminAddOptionForDropdownAttributeActionGroup">
12+
<annotations>
13+
<description>Click on new value of selector attribute and fill the values for storefront view, and admin product edit page</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="storefrontViewAttributeValue" defaultValue="{{ProductAttributeOption8.label}}" type="string" />
17+
<argument name="adminAttributeValue" defaultValue="{{ProductAttributeOption8.label}}" type="string" />
18+
<argument name="rowNumber" defaultValue="0" type="string"/>
19+
</arguments>
20+
<scrollTo selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="scrollToOption"/>
21+
<click selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="clickOnAddValueButton"/>
22+
<waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.defaultStoreView(rowNumber)}}" stepKey="waitForDefaultStoreViewToVisible"/>
23+
<fillField selector="{{AdminCreateNewProductAttributeSection.defaultStoreView(rowNumber)}}" userInput="{{storefrontViewAttributeValue}}" stepKey="fillDefaultStoreView"/>
24+
<fillField selector="{{AdminCreateNewProductAttributeSection.adminOption(rowNumber)}}" userInput="{{adminAttributeValue}}" stepKey="fillAdminField"/>
25+
</actionGroup>
26+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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="AdminAssertProductAttributeInAttributeGridActionGroup">
12+
<annotations>
13+
<description>Assert columns label, visible, searchable and comparable for attribute on the product attribute grid</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productAttributeLabel" type="string"/>
17+
<argument name="productAttributeVisible" defaultValue="Yes" type="string"/>
18+
<argument name="productAttributeSearch" defaultValue="Yes" type="string"/>
19+
<argument name="productAttributeCompare" defaultValue="No" type="string"/>
20+
</arguments>
21+
<see selector="{{AdminProductAttributeGridSection.defaultLabelColumn}}" userInput="{{productAttributeLabel}}" stepKey="seeDefaultLabel"/>
22+
<see selector="{{AdminProductAttributeGridSection.isVisibleColumn}}" userInput="{{productAttributeVisible}}" stepKey="seeIsVisibleColumn"/>
23+
<see selector="{{AdminProductAttributeGridSection.isSearchableColumn}}" userInput="{{productAttributeSearch}}" stepKey="seeSearchableColumn"/>
24+
<see selector="{{AdminProductAttributeGridSection.isComparableColumn}}" userInput="{{productAttributeCompare}}" stepKey="seeComparableColumn"/>
25+
</actionGroup>
26+
</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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAssertProductAttributeOnProductEditPageActionGroup">
12+
<annotations>
13+
<description>Assert if product attribute present on the product Create/Edit page</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="attributeCode" defaultValue="{{newProductAttribute.attribute_code}}" type="string"/>
17+
<argument name="attributeLabel" defaultValue="{{ProductAttributeFrontendLabel.label}}" type="string"/>
18+
</arguments>
19+
<conditionalClick selector="{{AdminProductFormSection.attributeTab}}" dependentSelector="{{AdminProductFormSection.attributeTabOpened}}" visible="false" stepKey="clickToOpen"/>
20+
<scrollTo selector="{{AdminProductFormSection.attributeTab}}" stepKey="scrollToAttributeTab"/>
21+
<seeElement selector="{{AdminProductFormSection.attributeLabelByText(attributeLabel)}}" stepKey="seeAttributeLabelInProductForm"/>
22+
<seeElement selector="{{AdminProductFormSection.newAddedAttribute(attributeCode)}}" stepKey="seeProductAttributeIsAdded"/>
23+
</actionGroup>
24+
</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="AdminClickMassUpdateProductAttributesActionGroup">
12+
<annotations>
13+
<description>Clicks on 'Update attributes' from dropdown actions list on product grid page. Products should be selected via mass action before</description>
14+
</annotations>
15+
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickDropdown"/>
16+
<click selector="{{AdminProductGridSection.bulkActionOption('Update attributes')}}" stepKey="clickOption"/>
17+
<seeInCurrentUrl url="catalog/product_action_attribute/edit/" stepKey="seeInUrl"/>
18+
</actionGroup>
19+
</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="AdminSaveProductsMassAttributesUpdateActionGroup">
12+
<annotations>
13+
<description>Clicks on 'Save' button on products mass attributes update page.</description>
14+
</annotations>
15+
<click selector="{{AdminEditProductAttributesSection.Save}}" stepKey="save"/>
16+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" time="60" stepKey="waitForSuccessMessage"/>
17+
<see selector="{{AdminMessagesSection.success}}" userInput="Message is added to queue" stepKey="assertSuccessMessage"/>
18+
</actionGroup>
19+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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="AdminStartCreateProductAttributeOnProductPageActionGroup">
12+
<annotations>
13+
<description>On the Create/Edit product page create new Attribute</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="attributeCode" defaultValue="{{newProductAttribute.attribute_code}}" type="string" />
17+
<argument name="attributeLabel" defaultValue="{{ProductAttributeFrontendLabel.label}}" type="string" />
18+
<argument name="inputType" defaultValue="Dropdown" type="string" />
19+
</arguments>
20+
<click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/>
21+
<waitForElementVisible selector="{{AdminProductFormSection.createNewAttributeBtn}}" stepKey="waitForCreateBtn"/>
22+
<click selector="{{AdminProductFormSection.createNewAttributeBtn}}" stepKey="clickCreateNewAttributeButton"/>
23+
<waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.defaultLabel}}" stepKey="waitForLabelInput"/>
24+
<fillField selector="{{AdminCreateNewProductAttributeSection.defaultLabel}}" userInput="{{attributeLabel}}" stepKey="fillAttributeLabel"/>
25+
<selectOption selector="{{AdminCreateNewProductAttributeSection.inputType}}" userInput="{{inputType}}" stepKey="setInputType"/>
26+
<click selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="clickOnAdvancedAttributeProperties"/>
27+
<waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" stepKey="waitForAttributeCodeToVisible"/>
28+
<fillField selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" userInput="{{attributeCode}}" stepKey="fillAttributeCode"/>
29+
</actionGroup>
30+
</actionGroups>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminCreateNewProductAttributeSection">
12-
<element name="saveAttribute" type="button" selector="#save"/>
12+
<element name="saveAttribute" type="button" selector="#save" timeout="30"/>
1313
<element name="defaultLabel" type="input" selector="input[name='frontend_label[0]']"/>
1414
<element name="inputType" type="select" selector="select[name='frontend_input']" timeout="30"/>
1515
<element name="addValue" type="button" selector="//button[contains(@data-action,'add_new_row')]" timeout="30"/>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@
2323
<element name="defaultLabel" type="text" selector="//td[contains(text(), '{{attributeName}}')]/following-sibling::td[contains(@class, 'col-frontend_label')]" parameterized="true"/>
2424
<element name="formByStoreId" type="block" selector="//form[contains(@action,'store/{{store_id}}')]" parameterized="true"/>
2525
<element name="tabButton" type="text" selector="#product_attribute_tabs a[title='{{tabName}}']" parameterized="true"/>
26+
<element name="attributeShortDescription" type="text" selector="#short_description"/>
27+
<element name="changeAttributeShortDescriptionToggle" type="checkbox" selector="#toggle_short_description"/>
2628
</section>
2729
</sections>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
<element name="FilterByAttributeCode" type="input" selector="#attributeGrid_filter_attribute_code"/>
1919
<element name="attributeLabelFilter" type="input" selector="//input[@name='frontend_label']"/>
2020
<element name="attributeCodeColumn" type="text" selector="//div[@id='attributeGrid']//td[contains(@class,'col-attr-code col-attribute_code')]"/>
21-
<element name="defaultLabelColumn" type="text" selector="//div[@id='attributeGrid']//td[contains(@class,'col-label col-frontend_label')]"/>
21+
<element name="defaultLabelColumn" type="text" selector="//div[@id='attributeGrid']//table[@id='attributeGrid_table']//tbody//td[contains(@class,'col-label col-frontend_label')]"/>
2222
<element name="isVisibleColumn" type="text" selector="//div[@id='attributeGrid']//td[contains(@class,'a-center col-is_visible')]"/>
2323
<element name="scopeColumn" type="text" selector="//div[@id='attributeGrid']//td[contains(@class,'a-center col-is_global')]"/>
2424
<element name="isSearchableColumn" type="text" selector="//div[@id='attributeGrid']//td[contains(@class,'a-center col-is_searchable')]"/>
2525
<element name="isComparableColumn" type="text" selector="//div[@id='attributeGrid']//td[contains(@class,'a-center col-is_comparable')]"/>
2626
</section>
2727
</sections>
28+

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,13 @@
4848
<element name="contentTab" type="button" selector="//strong[contains(@class, 'admin__collapsible-title')]/span[text()='Content']"/>
4949
<element name="fieldError" type="text" selector="//input[@name='product[{{fieldName}}]']/following-sibling::label[@class='admin__field-error']" parameterized="true"/>
5050
<element name="priceFieldError" type="text" selector="//input[@name='product[price]']/parent::div/parent::div/label[@class='admin__field-error']"/>
51-
<element name="addAttributeBtn" type="button" selector="#addAttribute"/>
52-
<element name="createNewAttributeBtn" type="button" selector="button[data-index='add_new_attribute_button']"/>
51+
<element name="addAttributeBtn" type="button" selector="#addAttribute" timeout="30"/>
52+
<element name="createNewAttributeBtn" type="button" selector="button[data-index='add_new_attribute_button']" timeout="30"/>
5353
<element name="save" type="button" selector="#save-button" timeout="30"/>
5454
<element name="saveNewAttribute" type="button" selector="//aside[contains(@class, 'create_new_attribute_modal')]//button[@id='save']"/>
5555
<element name="successMessage" type="text" selector="#messages"/>
5656
<element name="attributeTab" type="button" selector="//strong[contains(@class, 'admin__collapsible-title')]/span[text()='Attributes']"/>
57+
<element name="attributeTabOpened" type="button" selector="//div[contains(@class, 'admin__collapsible-block-wrapper') and contains(@class, '_show') ]//span[text()='Attributes']"/>
5758
<element name="attributeLabel" type="input" selector="//input[@name='frontend_label[0]']"/>
5859
<element name="frontendInput" type="select" selector="select[name = 'frontend_input']"/>
5960
<element name="productFormTab" type="button" selector="//strong[@class='admin__collapsible-title']/span[contains(text(), '{{tabName}}')]" parameterized="true"/>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<element name="productGridHeaderCell" type="text" selector="//div[@data-role='grid-wrapper']//tr//th[contains(., '{{column}}')]" parameterized="true"/>
2727
<element name="multicheckDropdown" type="button" selector="div[data-role='grid-wrapper'] th.data-grid-multicheck-cell button.action-multicheck-toggle"/>
2828
<element name="multicheckOption" type="button" selector="//div[@data-role='grid-wrapper']//th[contains(@class, data-grid-multicheck-cell)]//li//span[text() = '{{label}}']" parameterized="true"/>
29-
<element name="bulkActionDropdown" type="button" selector="div.admin__data-grid-header-row.row div.action-select-wrap button.action-select"/>
30-
<element name="bulkActionOption" type="button" selector="//div[contains(@class,'admin__data-grid-header-row') and contains(@class, 'row')]//div[contains(@class, 'action-select-wrap')]//ul/li/span[text() = '{{label}}']" parameterized="true"/>
29+
<element name="bulkActionDropdown" type="button" selector="div.admin__data-grid-header-row.row div.action-select-wrap button.action-select" timeout="30"/>
30+
<element name="bulkActionOption" type="button" selector="//div[contains(@class,'admin__data-grid-header-row') and contains(@class, 'row')]//div[contains(@class, 'action-select-wrap')]//ul/li/span[text() = '{{label}}']" parameterized="true" timeout="30"/>
3131
<element name="productGridXRowYColumnButton" type="input" selector="table.data-grid tr.data-row:nth-child({{row}}) td:nth-child({{column}})" parameterized="true" timeout="30"/>
3232
<element name="table" type="text" selector="#container > div > div.admin__data-grid-wrap > table"/>
3333
<element name="firstRow" type="button" selector="tr.data-row:nth-of-type(1)"/>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
<element name="filterOption" type="text" selector=".filter-options-content .item"/>
1515
<element name="optionQty" type="text" selector=".filter-options-content .item .count"/>
1616
<element name="filterOptionByLabel" type="button" selector=" div.filter-options-item div[data-option-label='{{optionLabel}}']" parameterized="true"/>
17-
<element name="removeFilter" type="button" selector="div.filter-current .remove"/>
17+
<element name="removeFilter" type="button" selector="div.filter-current .remove" timeout="30"/>
1818
<element name="activeFilterOptions" type="text" selector=".filter-options-item.active .items"/>
1919
<element name="activeFilterOptionItemByPosition" type="text" selector=".filter-options-item.active .items li:nth-child({{itemPosition}}) a" parameterized="true"/>
20-
<element name="enabledFilterOptionItemByLabel" type="text" selector="//div[@class='filter-options']//li[@class='item']//a[contains(text(), '{{optionLabel}}')]" parameterized="true"/>
21-
<element name="disabledFilterOptionItemByLabel" type="text" selector="//div[@class='filter-options']//li[@class='item' and contains(text(), '{{optionLabel}}')]" parameterized="true"/>
20+
<element name="enabledFilterOptionItemByLabel" type="text" selector="//div[@class='filter-options']//li[@class='item']//a[contains(text(), '{{optionLabel}}')]" parameterized="true" timeout="30"/>
21+
<element name="disabledFilterOptionItemByLabel" type="text" selector="//div[@class='filter-options']//li[@class='item' and contains(text(), '{{optionLabel}}')]" parameterized="true" timeout="30"/>
2222
</section>
2323
</sections>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminCreateCustomProductAttributeWithDropdownFieldTest">
11+
<test name="AdminCreateCustomProductAttributeWithDropdownFieldTest" deprecated="Use AdminVerifyCreateCustomProductAttributeTest">
1212
<annotations>
1313
<stories value="Create product Attribute"/>
14-
<title value="Create Custom Product Attribute Dropdown Field (Not Required) from Product Page"/>
14+
<title value="DEPRECATED: Create Custom Product Attribute Dropdown Field (Not Required) from Product Page"/>
1515
<description value="login as admin and create configurable product attribute with Dropdown field"/>
1616
<severity value="BLOCKER"/>
1717
<testCaseId value="MC-10905"/>
1818
<group value="mtf_migrated"/>
1919
<skip>
20-
<issueId value="MC-15474"/>
20+
<issueId value="DEPRECATED">Use AdminVerifyCreateCustomProductAttributeTest</issueId>
2121
</skip>
2222
</annotations>
2323

0 commit comments

Comments
 (0)