Skip to content

Commit 40a6860

Browse files
committed
MQE-3311: modified sections and actiongroups
1 parent c321b2a commit 40a6860

File tree

4 files changed

+49
-45
lines changed

4 files changed

+49
-45
lines changed

app/code/Magento/Backend/Test/Mftf/ActionGroup/AdminLoginActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
</annotations>
1515
<arguments>
1616
<argument name="username" type="string" defaultValue="{{_ENV.MAGENTO_ADMIN_USERNAME}}"/>
17-
<argument name="password" type="string" defaultValue="{{_CREDS.magento/MAGENTO_ADMIN_PASSWORD}}"/></arguments>
17+
<argument name="password" type="string" defaultValue="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
18+
</arguments>
1819

1920
<amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/>
2021
<fillField selector="{{AdminLoginFormSection.username}}" userInput="{{username}}" stepKey="fillUsername"/>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminVerifiesListAndGridModeActionGroup.xml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,32 @@
1717

1818

1919
<!-- verify changes in List mode -->
20-
<seeElement selector='//*[@id="maincontent"]//*[@data-value="list"]' stepKey="seePageInListView" />
21-
<!--<see selector="{{AdminChecksListAndGridModeSection.listView}}" stepKey="seePageInListView"/>-->
20+
21+
<seeElement selector="{{AdminChecksListAndGridModeSection.listView}}" stepKey="seePageInListView"/>
22+
<scrollTo selector="{{AdminChecksListAndGridModeSection.gridMode}}" stepKey="scrollToGridMode"/>
2223
<click selector="{{AdminChecksListAndGridModeSection.gridMode}}" stepKey="clickGridMode"/>
23-
<waitForPageLoad stepKey="waitForGridMode"/>
24-
<see selector="{{AdminChecksListAndGridModeSection.gridView}}" stepKey="seePageInGridView"/>
25-
<click selector="{{AdminChecksListAndGridModeSection.listMode}}" stepKey="switchToListMode"/>
24+
<waitForPageLoad stepKey="waitForGridMode"/>
25+
<seeElement selector="{{AdminChecksListAndGridModeSection.gridView}}" stepKey="seePageInGridView"/>
26+
<click selector="{{AdminChecksListAndGridModeSection.listView}}" stepKey="clickListMode"/>
2627
<waitForPageLoad stepKey="waitForListMode"/>
27-
<see selector="{{AdminChecksListAndGridModeSection.pageProduct}}" stepKey="seePageProduct"/>
28-
<see selector="{{AdminChecksListAndGridModeSection.sortByPrice}}" stepKey="seeSortByPriceInListMode"/>
28+
<seeNumberOfElements selector="{{StorefrontCategoryMainSection.productLink}}" userInput="1" stepKey="seeNumberOfProductsInPage1"/>
2929
<click selector="{{AdminChecksListAndGridModeSection.productsPerPage}}" stepKey="clickProductsPerPageButtonInListMode"/>
3030
<waitForPageLoad stepKey="waitForProductsPerPage"/>
3131
<click selector="{{AdminChecksListAndGridModeSection.allButton}}" stepKey="selectAllButton"/>
3232
<waitForPageLoad stepKey="waitForSelectAll"/>
33-
<see selector="{{AdminChecksListAndGridModeSection.allProducts}}" stepKey="seeAllProducts"/>
33+
<seeElement selector="{{AdminChecksListAndGridModeSection.allProducts}}" stepKey="seeAllProducts"/>
3434
<click selector="{{AdminChecksListAndGridModeSection.gridMode}}" stepKey="switchToGridMode"/>
35-
<see selector="{{AdminChecksListAndGridModeSection.gridView}}" stepKey="seePageInGridView2"/>
36-
<click selector="{{AdminChecksListAndGridModeSection.listMode}}" stepKey="switchToListMode1"/>
37-
<see selector="{{AdminChecksListAndGridModeSection.listView}}" stepKey="seePageInListView1"/>
35+
<seeElement selector="{{AdminChecksListAndGridModeSection.gridView}}" stepKey="seePageInGridView2"/>
36+
<click selector="{{StorefrontCategoryProductSection.categoryListView}}" stepKey="switchToListMode1"/>
37+
<seeElement selector="{{AdminChecksListAndGridModeSection.listView}}" stepKey="seePageInListView1"/>
3838
<click selector="{{AdminChecksListAndGridModeSection.gridMode}}" stepKey="switchToGridMode1"/>
39-
<see selector="{{AdminChecksListAndGridModeSection.allProducts}}" stepKey="seePageProductsInGrid"/>
40-
<see selector="{{AdminChecksListAndGridModeSection.sortByPrice}}" stepKey="seeSortByPriceInGridMode"/>
4139
<click selector="{{AdminChecksListAndGridModeSection.productsPerPage}}" stepKey="clickProductsPerPageButtonInGridMode"/>
4240
<waitForPageLoad stepKey="waitForProductsPerPageOpen"/>
43-
<see selector="{{AdminChecksListAndGridModeSection.pageOptions1}}" stepKey="seePageOptions1"/>
44-
<see selector="{{AdminChecksListAndGridModeSection.pageOptions2}}" stepKey="seePageOptions2"/>
45-
<see selector="{{AdminChecksListAndGridModeSection.pageOptions3}}" stepKey="seePageOptions3"/>
46-
<see selector="{{AdminChecksListAndGridModeSection.pageOptions4}}" stepKey="seePageOptions4"/>
47-
<see selector="{{AdminChecksListAndGridModeSection.pageOptions5}}" stepKey="seePageOptions5"/>
41+
<seeElement selector="{{AdminChecksListAndGridModeSection.pageOptions1}}" stepKey="seePageOptions1"/>
42+
<seeElement selector="{{AdminChecksListAndGridModeSection.pageOptions2}}" stepKey="seePageOptions2"/>
43+
<seeElement selector="{{AdminChecksListAndGridModeSection.pageOptions3}}" stepKey="seePageOptions3"/>
44+
<seeElement selector="{{AdminChecksListAndGridModeSection.pageOptions4}}" stepKey="seePageOptions4"/>
45+
<seeElement selector="{{AdminChecksListAndGridModeSection.pageOptions5}}" stepKey="seePageOptions5"/>
4846

4947

5048

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@
1111
<section name="AdminChecksListAndGridModeSection">
1212

1313
<element name="listView" type="text" selector='//*[@id="maincontent"]//*[@data-value="list"]'/>
14-
<element name="gridMode" type="button" selector=".//*[@class='toolbar toolbar-products'][1]//*[@id='mode-grid']"/>
14+
<element name="gridMode" type="button" selector="//a[@class='modes-mode mode-grid']"/>
1515
<element name="gridView" type="text" selector='//*[@id="maincontent"]//*[@data-value="grid"]'/>
16-
<element name="listMode" type="button" selector='//*[@id="mode-list"]'/>
16+
<element name="listMode" type="button" selector='//*[@id="maincontent"]//*[@data-value="list]'/>
1717
<element name="pageProduct" type="text" selector='(//ol[@class="products list items product-items"]/li)[1]'/>
1818
<element name="sortByPrice" type="text" selector='.//*[@id="sorter"]//option[@value="price"]'/>
19-
<element name="productsPerPage" type="button" selector='/*[@id="limiter"]'/>
19+
<element name="productsPerPage" type="button" selector='//*[@class="field limiter"]//*[@id="limiter"]'/>
2020
<element name="allButton" type="button" selector='//*[@id="limiter"]/option[4]'/>
2121
<element name="allProducts" type="text" selector='//ol[@class="products list items product-items"]'/>
22-
<element name="pageOptions1" type="text" selector='(//*[@id="limiter"]/option)'/>
23-
<element name="pageOptions2" type="text" selector='(//*[@id="limiter"]/option)[2]'/>
24-
<element name="pageOptions3" type="text" selector='(//*[@id="limiter"]/option)[3]'/>
25-
<element name="pageOptions4" type="text" selector='//*[@id="limiter"]/option)[4]'/>
26-
<element name="pageOptions5" type="text" selector='(//*[@id="limiter"]/option)[5]'/>
27-
22+
<element name="pageOptions1" type="text" selector='//*[@id="limiter"]/option'/>
23+
<element name="pageOptions2" type="text" selector='//*[@id="limiter"]/option[2]'/>
24+
<element name="pageOptions3" type="text" selector='//*[@id="limiter"]/option[3]'/>
25+
<element name="pageOptions4" type="text" selector='//*[@id="limiter"]/option[4]'/>
26+
<element name="pageOptions5" type="text" selector='//*[@id="limiter"]/option[5]'/>
27+
<element name="productCount" type="text" selector='//span[@class="product-image-wrapper"]'/>
2828

2929

3030
</section>

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

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,11 @@
5656
</before>
5757

5858
<after>
59-
<!-- delete created entities -->
60-
<deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/>
61-
<deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/>
62-
<deleteData createDataKey="createSimpleProduct3" stepKey="deleteSimpleProduct3"/>
63-
<deleteData createDataKey="createSimpleProduct4" stepKey="deleteSimpleProduct4"/>
64-
<deleteData createDataKey="createSimpleProduct5" stepKey="deleteSimpleProduct5"/>
65-
<deleteData createDataKey="createSimpleProduct6" stepKey="deleteSimpleProduct6"/>
66-
<deleteData createDataKey="createSimpleProduct7" stepKey="deleteSimpleProduct7"/>
67-
<deleteData createDataKey="createSimpleProduct8" stepKey="deleteSimpleProduct8"/>
68-
<deleteData createDataKey="createSimpleProduct9" stepKey="deleteSimpleProduct9"/>
69-
<deleteData createDataKey="createSimpleProduct10" stepKey="deleteSimpleProduct10"/>
70-
<deleteData createDataKey="createSimpleProduct11" stepKey="deleteSimpleProduct11"/>
71-
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
72-
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
59+
60+
<actionGroup ref="AdminOpenDashboardPageActionGroup" stepKey="goToDashboardPage"/>
61+
<waitForPageLoad stepKey="waitForPageLoad1" time="60"/>
7362
<actionGroup ref="AdminOpenStoreConfigCatalogPageActionGroup" stepKey="navigateToConfigurationPage"/>
63+
<waitForPageLoad stepKey="waitForPageLoad" time="60"/>
7464
<actionGroup ref="AdminConfigExpandStorefrontTabActionGroup" stepKey="expandStorefrontTab"/>
7565

7666
<!-- Revert changes in storefront config page -->
@@ -101,11 +91,26 @@
10191
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
10292
<argument name="indices" value=""/>
10393
</actionGroup>
104-
<!--Clean cache-->
94+
10595
<actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache">
10696
<argument name="tags" value=""/>
10797
</actionGroup>
98+
99+
<!-- delete created entities -->
100+
<deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/>
101+
<deleteData createDataKey="createSimpleProduct2" stepKey="deleteSimpleProduct2"/>
102+
<deleteData createDataKey="createSimpleProduct3" stepKey="deleteSimpleProduct3"/>
103+
<deleteData createDataKey="createSimpleProduct4" stepKey="deleteSimpleProduct4"/>
104+
<deleteData createDataKey="createSimpleProduct5" stepKey="deleteSimpleProduct5"/>
105+
<deleteData createDataKey="createSimpleProduct6" stepKey="deleteSimpleProduct6"/>
106+
<deleteData createDataKey="createSimpleProduct7" stepKey="deleteSimpleProduct7"/>
107+
<deleteData createDataKey="createSimpleProduct8" stepKey="deleteSimpleProduct8"/>
108+
<deleteData createDataKey="createSimpleProduct9" stepKey="deleteSimpleProduct9"/>
109+
<deleteData createDataKey="createSimpleProduct10" stepKey="deleteSimpleProduct10"/>
110+
<deleteData createDataKey="createSimpleProduct11" stepKey="deleteSimpleProduct11"/>
111+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
108112
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
113+
109114
</after>
110115

111116
<!-- Login to Admin page -->
@@ -166,8 +171,8 @@
166171
</actionGroup>
167172

168173
<click selector=".//*[@class='toolbar toolbar-products'][1]//*[@data-value='grid']" stepKey="switchToGridMode4"/>
169-
<seeElement selector='//ol[@class="products list items product-items"]' stepKey="see10ProductsVisible" />
174+
<seeNumberOfElements selector="{{AdminChecksListAndGridModeSection.productCount}}" userInput="10" stepKey="seeNumberOfProductsInGridView"/>
175+
170176

171-
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
172177
</test>
173178
</tests>

0 commit comments

Comments
 (0)