Skip to content

27550 - Fix UX issue on Admin > Content > Pages/Blocks grid #27623

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

Open
wants to merge 19 commits into
base: 2.4-develop
Choose a base branch
from
Open
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
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminClickTableGridRowBySelectorActionGroup">
<annotations>
<description>Click table grid row by selector.</description>
</annotations>
<arguments>
<argument name="selector" type="string"/>
</arguments>

<click selector="{{selector}}" stepKey="clickRow"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminOpenCmsBlocksGridActionGroup">
<annotations>
<description>Goes to the Cms Blocks grid page.</description>
<description>Open grid of CMS Blocks.</description>
</annotations>
<amOnPage url="{{CmsBlocksPage.url}}" stepKey="navigateToCMSBlocksGrid"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<element name="checkbox" type="checkbox" selector="//label[@class='data-grid-checkbox-cell-inner']//input[@class='admin__control-checkbox']"/>
<element name="select" type="select" selector="//tr[@class='data-row']//button[@class='action-select']"/>
<element name="editInSelect" type="text" selector="//a[contains(text(), 'Edit')]"/>
<element name="addNewBlock" type="text" selector="//button[@title='Add New Block']"/>
<element name="blockEditPage" type="text" selector="//div[contains(text(),'{{blockTitle}}')]" parameterized="true"/>
<element name="gridDataRow" type="input" selector="//table[@data-role='grid']//tr/td"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
<element name="TextArea" type="input" selector="#cms_block_form_content"/>
<element name="image" type="file" selector=".mce-content-body img"/>
<element name="contentIframe" type="iframe" selector="cms_block_form_content_ifr"/>
<element name="showEditor" type="text" selector="//button[@id='togglecms_block_form_content']"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="BlockNewPageBasicFieldsSection">
<element name="isActive" type="button" selector="//input[@name='is_active' and @value='{{var1}}']" parameterized="true"/>
<element name="blockTitle" type="input" selector="input[name=title]"/>
<element name="blockTitle" type="input" selector="//input[@name='title']"/>
<element name="identifier" type="input" selector="input[name=identifier]"/>
<element name="storeView" type="multiselect" selector="select[name=store_id]"/>
<element name="duplicatedIdentifier" type="input" selector="//input[contains(@data-value,'{{var1}}')]" parameterized="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<element name="pageRowCheckboxByIdentifier" type="checkbox" selector="//table[@data-role='grid']//td[count(../../..//th[./*[.='URL Key']]/preceding-sibling::th) + 1][./*[.='{{identifier}}']]/../td//input[@data-action='select-row']" parameterized="true" />
<element name="massActionsButton" type="button" selector="//div[@class='admin__data-grid-header'][(not(ancestor::*[@class='sticky-header']) and not(contains(@style,'visibility: hidden'))) or (ancestor::*[@class='sticky-header' and not(contains(@style,'display: none'))])]//button[contains(@class, 'action-select')]" />
<element name="massActionsOption" type="button" selector="//div[@class='admin__data-grid-header'][(not(ancestor::*[@class='sticky-header']) and not(contains(@style,'visibility: hidden'))) or (ancestor::*[@class='sticky-header' and not(contains(@style,'display: none'))])]//span[contains(@class, 'action-menu-item') and .= '{{action}}']" parameterized="true"/>
<element name="homePage" type="text" selector="//div[contains(text(),'Home page')]"/>
<element name="gridDataRow" type="input" selector=".data-row .data-grid-cell-content"/>
<element name="pagesGridRowByTitle" type="input" selector="//tbody//tr//td//div[contains(., '{{var1}}')]" parameterized="true" timeout="30"/>
</section>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?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="AdminOpenBlockEditPageAfterClickBlockOnGridTest">
<annotations>
<features value="Cms"/>
<stories value="Open CMS Block Edit Page"/>
<title value="Open CMS Block Edit Page after choosing block on the grid."/>
<description value="Open CMS Block Edit Page after choosing block on the grid."/>
<testCaseId value="MC-38853"/>
<severity value="MINOR"/>
</annotations>
<before>
<createData entity="_defaultBlock" stepKey="createPreReqBlock" />
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
</before>
<after>
<deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock" />
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>

<actionGroup ref="AdminOpenCmsBlocksGridActionGroup" stepKey="openCmsBlocksGrid"/>

<actionGroup ref="AdminClickTableGridRowBySelectorActionGroup" stepKey="clickTableRow">
<argument name="selector" value="{{AdminBlockGridSection.blockEditPage(_defaultBlock.title)}}"/>
</actionGroup>

<actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitle">
<argument name="title" value="{{_defaultBlock.title}}"/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?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="AdminOpenCmsEditPageAfterClickPageOnGridTest">
<annotations>
<features value="Cms"/>
<stories value="Open CMS Edit Page"/>
<title value="Open CMS Edit Page after choosing page on the grid."/>
<description value="Open CMS Edit Page after choosing page on the grid."/>
<testCaseId value="MC-38854"/>
<severity value="MINOR"/>
</annotations>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
</before>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>

<actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCmsPagesGrid"/>
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/>

<actionGroup ref="AdminClickTableGridRowBySelectorActionGroup" stepKey="clickTableRow">
<argument name="selector" value="{{CmsPagesPageActionsSection.homePage}}"/>
</actionGroup>

<actionGroup ref="AdminAssertPageTitleActionGroup" stepKey="seePageTitle">
<argument name="title" value="Home page"/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,13 @@
</listingToolbar>
<columns name="cms_block_columns">
<settings>
<editorConfig>
<param name="clientConfig" xsi:type="array">
<item name="saveUrl" xsi:type="url" path="cms/block/inlineEdit"/>
<item name="validateBeforeSave" xsi:type="boolean">false</item>
</param>
<param name="indexField" xsi:type="string">block_id</param>
<param name="enabled" xsi:type="boolean">true</param>
<param name="selectProvider" xsi:type="string">cms_block_listing.cms_block_listing.cms_block_columns.ids</param>
</editorConfig>
<childDefaults>
<param name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">cms_block_listing.cms_block_listing.cms_block_columns_editor</item>
<item name="target" xsi:type="string">startEdit</item>
<item name="provider" xsi:type="string">cms_block_listing.cms_block_listing.cms_block_columns.actions</item>
<item name="target" xsi:type="string">applyAction</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">${ $.$data.rowIndex }</item>
<item name="1" xsi:type="boolean">true</item>
<item name="0" xsi:type="string">edit</item>
<item name="1" xsi:type="string">${ $.$data.rowIndex }</item>
</item>
</param>
</childDefaults>
Expand All @@ -131,25 +122,12 @@
<column name="title">
<settings>
<filter>text</filter>
<editor>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<editorType>text</editorType>
</editor>
<label translate="true">Title</label>
</settings>
</column>
<column name="identifier">
<settings>
<filter>text</filter>
<editor>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
<rule name="no-marginal-whitespace" xsi:type="boolean">true</rule>
</validation>
<editorType>text</editorType>
</editor>
<label translate="true">Identifier</label>
</settings>
</column>
Expand All @@ -164,9 +142,6 @@
<settings>
<options class="Magento\Cms\Model\Block\Source\IsActive"/>
<filter>select</filter>
<editor>
<editorType>select</editorType>
</editor>
<dataType>select</dataType>
<label translate="true">Status</label>
</settings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,13 @@
</listingToolbar>
<columns name="cms_page_columns">
<settings>
<editorConfig>
<param name="clientConfig" xsi:type="array">
<item name="saveUrl" xsi:type="url" path="cms/page/inlineEdit"/>
<item name="validateBeforeSave" xsi:type="boolean">false</item>
</param>
<param name="indexField" xsi:type="string">page_id</param>
<param name="enabled" xsi:type="boolean">true</param>
<param name="selectProvider" xsi:type="string">cms_page_listing.cms_page_listing.cms_page_columns.ids</param>
</editorConfig>
<childDefaults>
<param name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">cms_page_listing.cms_page_listing.cms_page_columns_editor</item>
<item name="target" xsi:type="string">startEdit</item>
<item name="provider" xsi:type="string">cms_page_listing.cms_page_listing.cms_page_columns.actions</item>
<item name="target" xsi:type="string">applyAction</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">${ $.$data.rowIndex }</item>
<item name="1" xsi:type="boolean">true</item>
<item name="0" xsi:type="string">edit</item>
<item name="1" xsi:type="string">${ $.$data.rowIndex }</item>
</item>
</param>
</childDefaults>
Expand All @@ -152,34 +143,19 @@
<column name="title">
<settings>
<filter>text</filter>
<editor>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<editorType>text</editorType>
</editor>
<label translate="true">Title</label>
</settings>
</column>
<column name="identifier">
<settings>
<filter>text</filter>
<editor>
<validation>
<rule name="validate-identifier" xsi:type="boolean">true</rule>
</validation>
<editorType>text</editorType>
</editor>
<label translate="true">URL Key</label>
</settings>
</column>
<column name="page_layout" component="Magento_Ui/js/grid/columns/select">
<settings>
<options class="Magento\Cms\Model\Page\Source\PageLayout"/>
<filter>select</filter>
<editor>
<editorType>select</editorType>
</editor>
<dataType>select</dataType>
<label translate="true">Layout</label>
</settings>
Expand All @@ -195,9 +171,6 @@
<settings>
<options class="Magento\Cms\Model\Page\Source\IsActive"/>
<filter>select</filter>
<editor>
<editorType>select</editorType>
</editor>
<dataType>select</dataType>
<label translate="true">Status</label>
</settings>
Expand All @@ -221,9 +194,6 @@
<timezone>false</timezone>
<dateFormat>MMM d, y</dateFormat>
<filter>dateRange</filter>
<editor>
<editorType>date</editorType>
</editor>
<dataType>date</dataType>
<label translate="true">Custom design from</label>
<visible>false</visible>
Expand All @@ -234,9 +204,6 @@
<timezone>false</timezone>
<dateFormat>MMM d, y</dateFormat>
<filter>dateRange</filter>
<editor>
<editorType>date</editorType>
</editor>
<dataType>date</dataType>
<label translate="true">Custom design to</label>
<visible>false</visible>
Expand All @@ -246,9 +213,6 @@
<settings>
<options class="Magento\Cms\Model\Page\Source\Theme"/>
<filter>select</filter>
<editor>
<editorType>select</editorType>
</editor>
<dataType>select</dataType>
<label translate="true">Custom Theme</label>
<visible>false</visible>
Expand All @@ -258,9 +222,6 @@
<settings>
<options class="Magento\Cms\Model\Page\Source\CustomLayout"/>
<filter>select</filter>
<editor>
<editorType>select</editorType>
</editor>
<dataType>select</dataType>
<label translate="true">Custom Layout</label>
<visible>false</visible>
Expand All @@ -269,29 +230,20 @@
<column name="meta_title">
<settings>
<filter>text</filter>
<editor>
<editorType>text</editorType>
</editor>
<label translate="true">Meta Title</label>
<visible>false</visible>
</settings>
</column>
<column name="meta_keywords">
<settings>
<filter>text</filter>
<editor>
<editorType>text</editorType>
</editor>
<label translate="true">Meta Keywords</label>
<visible>false</visible>
</settings>
</column>
<column name="meta_description">
<settings>
<filter>text</filter>
<editor>
<editorType>text</editorType>
</editor>
<label translate="true">Meta Description</label>
<visible>false</visible>
</settings>
Expand Down