Skip to content

Commit

Permalink
ENGCOM-6425: Resolve Duplicate Records when sorting column in Content…
Browse files Browse the repository at this point in the history
…->Themes Grid issue25925 #25926
  • Loading branch information
VladimirZaets authored Dec 9, 2019
2 parents 3d41f5f + 464f6cc commit 7ad79f7
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
<element name="rowsInThemeTitleColumn" type="text" selector="//tbody/tr/td[contains(@class, 'parent_theme')]/preceding-sibling::td"/>
<element name="rowsInColumn" type="text" selector="//tbody/tr/td[contains(@class, '{{column}}')]" parameterized="true"/>
<!--Specific cell e.g. {{Section.gridCell('Name')}}-->
<element name="gridCell" type="text" selector="//table[@id='theme_grid_table']//td[contains(text(), '{{gridCellText}}')]" parameterized="true"/>
<element name="gridCell" type="text" selector="//table//div[contains(text(), '{{gridCellText}}')]" parameterized="true"/>
<element name="gridCellUpdated" type="text" selector="//tbody//tr//div[contains(text(), '{{gridCellText}}')]" parameterized="true"/>
<element name="columnHeader" type="text" selector="//thead/tr/th[contains(@class, 'data-grid-th')]/span[text() = '{{label}}']" parameterized="true" timeout="30"/>
</section>
</sections>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminContentThemesSortTest">
<annotations>
<features value="Theme"/>
<stories value="Menu Navigation"/>
<title value="Admin content themes sort themes test"/>
<description value="Admin should be able to sort Themes"/>
<severity value="CRITICAL"/>
<testCaseId value="https://github.com/magento/magento2/pull/25926"/>
<group value="menu"/>
</annotations>
<before>
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
</before>
<after>
<actionGroup ref="logout" stepKey="logout"/>
</after>
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToContentThemesPage">
<argument name="menuUiId" value="{{AdminMenuContent.dataUiId}}"/>
<argument name="submenuUiId" value="{{AdminMenuContentDesignThemes.dataUiId}}"/>
</actionGroup>
<actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitle">
<argument name="title" value="{{AdminMenuContentDesignThemes.pageTitle}}"/>
</actionGroup>
<click selector="{{AdminThemeSection.columnHeader('Theme Title')}}" stepKey="clickSortByTitle"/>
<click selector="{{AdminThemeSection.columnHeader('Theme Title')}}" stepKey="clickSortByTitleSecondTime"/>
<seeNumberOfElements selector="{{AdminThemeSection.rowsInColumn('theme_path')}}" userInput="2" stepKey="see2RowsOnTheGrid"/>
<seeNumberOfElements selector="{{AdminThemeSection.gridCellUpdated('Magento Luma')}}" userInput="1" stepKey="seeLumaThemeInTitleColumn"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<dataSource name="design_theme_listing_data_source" component="Magento_Ui/js/grid/provider">
<settings>
<updateUrl path="mui/index/render"/>
<storageConfig>
<param name="indexField" xsi:type="string">theme_id</param>
</storageConfig>
</settings>
<aclResource>Magento_Theme::theme</aclResource>
<dataProvider class="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider" name="design_theme_listing_data_source">
Expand Down

0 comments on commit 7ad79f7

Please sign in to comment.