Skip to content

Commit 049a84b

Browse files
author
Anna Bukatar
committed
ACP2E-980: Customizable options Drag and drop issue
1 parent fcca934 commit 049a84b

File tree

3 files changed

+48
-15
lines changed

3 files changed

+48
-15
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@
5757
<element name="optionSku" type="input" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr//*[@name='product[options][{{index}}][sku]']" parameterized="true"/>
5858
<element name="optionFileExtensions" type="input" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr//*[@name='product[options][{{index}}][file_extension]']" parameterized="true"/>
5959
<element name="importOptions" type="button" selector="//button[@data-index='button_import']" timeout="30"/>
60+
61+
<!-- Records/Rows Pagination -->
6062
<element name="customOptionTableRows" type="button" selector=".admin__dynamic-rows[data-index='values'] tr.data-row" timeout="30"/>
6163
<element name="customOptionsTableRecords" type="button" selector=".admin__dynamic-rows[data-index='options']>tbody>tr.data-row" timeout="30"/>
64+
65+
<!-- Elements to test drag&drop -->
66+
<element name="dragCustomOptionRecord" type="block" selector="(//tr[{{dragIndex}}]//div[contains(@class, 'draggable-handle')])[1]" timeout="30" parameterized="true"/>
67+
<element name="customOptionRecordTitle" type="button" selector="//table[@data-index='options']//tr[{{index}}]//div[contains(@class, 'admin__collapsible-title')]//span" timeout="30" parameterized="true"/>
6268
</section>
6369
</sections>
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminValidateSimpleProductWithCustomOptionsDragNDropPerPageTest" extends="AdminValidateSimpleProductWithCustomOptionsPerPageTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Customizable options Drag and drop issue"/>
15+
<title value="Customizable options Drag&amp;Drop records across pages"/>
16+
<description value="Validate product's customizable option records Drag&amp;Drop functionality across pages in Admin"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="AC-6086"/>
19+
<useCaseId value="ACP2E-980"/>
20+
<group value="SimpleProduct"/>
21+
</annotations>
22+
<!-- Create a second custom option with 2 values -->
23+
<actionGroup ref="AdminCreateCustomDropDownOptionsActionGroup" stepKey="createSecondCustomOption">
24+
<argument name="customOptionName" value="{{ProductOptionDropDown.title}}2"/>
25+
<argument name="firstOption" value="ProductOptionValueDropdown1"/>
26+
<argument name="secondOption" value="ProductOptionValueDropdown2"/>
27+
</actionGroup>
28+
29+
<!-- Validate drag&drop -->
30+
<dragAndDrop selector1="{{AdminProductCustomizableOptionsSection.dragCustomOptionRecord('2')}}" selector2="{{AdminProductCustomizableOptionsSection.dragCustomOptionRecord('1')}}" stepKey="moveCustomOptionRecord"/>
31+
<waitForPageLoad stepKey="waitForDragAndDrop"/>
32+
<see userInput="{{ProductOptionDropDown.title}}2" selector="{{AdminProductCustomizableOptionsSection.customOptionRecordTitle('1')}}" stepKey="seeCustomOptionRecord"/>
33+
34+
<!-- Validate custom options records per page -->
35+
<scrollToTopOfPage stepKey="scrollToPerPageDropdown"/>
36+
<actionGroup ref="AdminOpenAndApplyCustomOptionRecordsPerPageActionGroup" stepKey="openAndApplyCustomOptionsPerPageDropdown">
37+
<argument name="perPageInputValue" value="1"/>
38+
</actionGroup>
39+
<waitForElementVisible selector="{{AdminProductCustomizableOptionsSection.customOptionsTableRecords}}" stepKey="waitForCustomOptionsToBeVisible"/>
40+
<seeNumberOfElements selector="{{AdminProductCustomizableOptionsSection.customOptionsTableRecords}}" userInput="1" stepKey="see1CustomOptionRecord"/>
41+
</test>
42+
</tests>

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,5 @@
5656
</actionGroup>
5757
<waitForElementVisible selector="{{AdminProductCustomizableOptionsSection.customOptionTableRows}}" stepKey="waitForRowsToBeVisible"/>
5858
<seeNumberOfElements selector="{{AdminProductCustomizableOptionsSection.customOptionTableRows}}" userInput="1" stepKey="see4RowsOfOptions"/>
59-
60-
<!-- Create a second custom option with 2 values -->
61-
<actionGroup ref="AdminCreateCustomDropDownOptionsActionGroup" stepKey="createSecondCustomOption">
62-
<argument name="customOptionName" value="{{ProductOptionDropDown.title}}2"/>
63-
<argument name="firstOption" value="ProductOptionValueDropdown1"/>
64-
<argument name="secondOption" value="ProductOptionValueDropdown2"/>
65-
</actionGroup>
66-
67-
<!-- Validate custom options records per page -->
68-
<scrollToTopOfPage stepKey="scrollToPerPageDropdown"/>
69-
<actionGroup ref="AdminOpenAndApplyCustomOptionRecordsPerPageActionGroup" stepKey="openAndApplyCustomOptionsPerPageDropdown">
70-
<argument name="perPageInputValue" value="1"/>
71-
</actionGroup>
72-
<waitForElementVisible selector="{{AdminProductCustomizableOptionsSection.customOptionsTableRecords}}" stepKey="waitForCustomOptionsToBeVisible"/>
73-
<seeNumberOfElements selector="{{AdminProductCustomizableOptionsSection.customOptionsTableRecords}}" userInput="1" stepKey="see1CustomOptionRecord"/>
7459
</test>
7560
</tests>

0 commit comments

Comments
 (0)