Skip to content

Commit 6140368

Browse files
committed
Merge remote-tracking branch 'origin/MC-37098' into 2.4-develop-sidecar-pr3
2 parents 331dba1 + a77560c commit 6140368

7 files changed

+118
-2
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: 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>

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/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)"/>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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="AdminMassProductAttributeUpdateAddedToQueueTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Mass update product attributes"/>
15+
<title value="Check functionality of RabbitMQ"/>
16+
<description value="Mass product attribute update task should be added to the queue"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-28990"/>
19+
<useCaseId value="MC-29179"/>
20+
<group value="catalog"/>
21+
<group value="asynchronousOperations"/>
22+
</annotations>
23+
<before>
24+
<createData entity="ApiProductWithDescription" stepKey="createFirstProduct"/>
25+
<createData entity="ApiProductWithDescription" stepKey="createSecondProduct"/>
26+
<createData entity="ApiProductNameWithNoSpaces" stepKey="createThirdProduct"/>
27+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
28+
</before>
29+
<after>
30+
<deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/>
31+
<deleteData createDataKey="createSecondProduct" stepKey="deleteSecondProduct"/>
32+
<deleteData createDataKey="createThirdProduct" stepKey="deleteThirdProduct"/>
33+
<actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductFilter"/>
34+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
35+
</after>
36+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
37+
<actionGroup ref="SearchProductGridByKeyword2ActionGroup" stepKey="searchByKeyword">
38+
<argument name="keyword" value="api-simple-product"/>
39+
</actionGroup>
40+
<actionGroup ref="SortProductsByIdDescendingActionGroup" stepKey="sortProductsByIdDescending"/>
41+
<click selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="selectThirdProduct"/>
42+
<click selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="selectSecondProduct"/>
43+
<click selector="{{AdminProductGridSection.productGridCheckboxOnRow('3')}}" stepKey="selectFirstProduct"/>
44+
<actionGroup ref="AdminClickMassUpdateProductAttributesActionGroup" stepKey="goToUpdateProductAttributesPage"/>
45+
<checkOption selector="{{AdminEditProductAttributesSection.changeAttributeShortDescriptionToggle}}" stepKey="toggleToChangeShortDescription"/>
46+
<fillField selector="{{AdminEditProductAttributesSection.attributeShortDescription}}" userInput="Test Update" stepKey="fillShortDescriptionField"/>
47+
<actionGroup ref="AdminSaveProductsMassAttributesUpdateActionGroup" stepKey="saveMassAttributeUpdate"/>
48+
<see selector="{{AdminSystemMessagesSection.info}}" userInput="Task &quot;Update attributes for 3 selected products&quot;: 1 item(s) have been scheduled for update." stepKey="seeInfoMessage"/>
49+
<click selector="{{AdminSystemMessagesSection.viewDetailsLink}}" stepKey="seeDetails"/>
50+
<see selector="{{AdminBulkDetailsModalSection.descriptionValue}}" userInput="Update attributes for 3 selected products" stepKey="seeDescription"/>
51+
<see selector="{{AdminBulkDetailsModalSection.summaryValue}}" userInput="Pending, in queue..." stepKey="seeSummary"/>
52+
<grabTextFrom selector="{{AdminBulkDetailsModalSection.startTimeValue}}" stepKey="grabStartTimeValue"/>
53+
<assertRegExp stepKey="assertStartTime">
54+
<expectedResult type="string">/\d{1,2}\/\d{2}\/\d{4}\s\d{1,2}:\d{2}:\d{2}\s(AM|PM)/</expectedResult>
55+
<actualResult type="variable">grabStartTimeValue</actualResult>
56+
</assertRegExp>
57+
</test>
58+
</tests>

0 commit comments

Comments
 (0)