Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve Duplicate Records when sorting column in Content->Themes Grid issue25925 #25926

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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