Skip to content

Commit 8f1c695

Browse files
author
Viktor Sevch
committed
MC-35316: Pagination products not work in admin create order page
1 parent 0769167 commit 8f1c695

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

app/code/Magento/Sales/Test/Mftf/Test/AdminOrderPagerTest.xml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1111
<test name="AdminOrderPagerTest">
1212
<annotations>
13+
<features value="Sales"/>
1314
<stories value="Admin order pager"/>
1415
<title value="Check pager is working"/>
1516
<description value="Check Pager in order add products grid"/>
1617
<severity value="AVERAGE"/>
1718
<testCaseId value="MC-35349"/>
19+
<useCaseId value="MC-35316"/>
1820
<group value="sales"/>
1921
</annotations>
2022
<before>
@@ -91,8 +93,7 @@
9193
</before>
9294
<after>
9395
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
94-
<!-- Delete category and products -->
95-
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
96+
<!-- Delete products -->
9697
<deleteData createDataKey="createProduct01" stepKey="deleteProduct1"/>
9798
<deleteData createDataKey="createProduct02" stepKey="deleteProduct2"/>
9899
<deleteData createDataKey="createProduct03" stepKey="deleteProduct3"/>
@@ -115,6 +116,9 @@
115116
<deleteData createDataKey="createProduct20" stepKey="deleteProduct20"/>
116117
<deleteData createDataKey="createProduct21" stepKey="deleteProduct21"/>
117118

119+
<!-- Delete Category -->
120+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
121+
118122
<!-- Delete Customer -->
119123
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
120124
</after>
@@ -124,10 +128,13 @@
124128
<argument name="customer" value="$createCustomer$"/>
125129
</actionGroup>
126130

131+
<waitForElementVisible selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="waitForAddProductsButtonAppeared"/>
127132
<click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
128-
<click selector="{{AdminDataGridPaginationSection.nextPage}}" stepKey="clickNextPage"/>
133+
<dontSee selector="{{AdminDataGridPaginationSection.prevPageActive}}" stepKey="previousPageDisabled"/>
134+
<click selector="{{AdminDataGridPaginationSection.nextPageActive}}" stepKey="clickNextPage"/>
129135
<seeInField selector="{{AdminDataGridPaginationSection.selectedPage}}" userInput="2" stepKey="seeSecondPageOrderGrid"/>
130-
<click selector="{{AdminDataGridPaginationSection.previousPage}}" stepKey="clickPreviousPage"/>
136+
<click selector="{{AdminDataGridPaginationSection.prevPageActive}}" stepKey="clickPreviousPage"/>
131137
<seeInField selector="{{AdminDataGridPaginationSection.selectedPage}}" userInput="1" stepKey="seeFirstPageOrderGrid"/>
138+
<dontSee selector="{{AdminDataGridPaginationSection.prevPageActive}}" stepKey="prevPageDisabled"/>
132139
</test>
133140
</tests>

app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
<element name="perPageDropDownItem" type="button" selector="//*[contains(@class, 'selectmenu-items _active')]//button[contains(@class, 'selectmenu-item-action') and text()='{{dropDownItem}}']" timeout="30" parameterized="true"/>
1717
<element name="perPageEditCustomValue" type="button" selector="//div[contains(@class, 'selectmenu-items _active')]//div[contains(@class, 'selectmenu-item')]//button[text()='{{perPageCustomValue}}']/following-sibling::button[contains(@class, 'action-edit')]" parameterized="true"/>
1818
<element name="perPageDeleteCustomValue" type="button" selector="//div[contains(@class, 'selectmenu-items _active')]//div[contains(@class, 'selectmenu-item')]//button[text()='{{perPageCustomValue}}']/parent::div/preceding-sibling::div/button[contains(@class, 'action-delete')]" parameterized="true"/>
19-
<element name="nextPage" type="button" selector="div.admin__data-grid-pager > button.action-next:not(.disabled)" timeout="30"/>
20-
<element name="previousPage" type="button" selector="div.admin__data-grid-pager > button.action-previous:not(.disabled)" timeout="30"/>
19+
<element name="nextPage" type="button" selector="div.admin__data-grid-pager > button.action-next" timeout="30"/>
20+
<element name="previousPage" type="button" selector="div.admin__data-grid-pager > button.action-previous" timeout="30"/>
2121
<element name="currentPage" type="input" selector="div.admin__data-grid-pager > input[data-ui-id='current-page-input']"/>
2222
<element name="totalPages" type="text" selector="div.admin__data-grid-pager > label"/>
2323
<element name="perPageDropDownValue" type="input" selector=".selectmenu-value input" timeout="30"/>
2424
<element name="selectedPage" type="input" selector="#sales_order_create_search_grid_page-current" timeout="30"/>
25+
<element name="nextPageActive" type="button" selector="div.admin__data-grid-pager > button.action-next:not(.disabled)" timeout="30"/>
26+
<element name="prevPageActive" type="button" selector="div.admin__data-grid-pager > button.action-previous:not(.disabled)" timeout="30"/>
2527
</section>
2628
</sections>

0 commit comments

Comments
 (0)