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

[MFTF] Add AdminOpenUrlRewritesGridPageActionGroup #30839

Open
wants to merge 8 commits into
base: 2.4-develop
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage2"/>
<grabFromCurrentUrl stepKey="categoryId" regex="#\/([0-9]*)?\/$#" />

<!--Open Url Rewrite Page-->
<amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="openUrlRewriteIndexPage"/>
<waitForPageLoad stepKey="waitForUrlRewritePage"/>
<actionGroup ref="AdminOpenUrlRewritesGridPageActionGroup" stepKey="openUrlRewriteIndexPage"/>
<comment userInput="Adding the comment to replace action for preserving backward compatibility" stepKey="waitForUrlRewritePage"/>

<!--Search third level category Redirect Path, Target Path and Redirect Type-->
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters"/>
Expand Down Expand Up @@ -84,9 +83,8 @@
<waitForPageLoad stepKey="waitForPageToLoad3"/>
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You moved the category." stepKey="seeSuccessMoveMessage"/>

<!--Open Url Rewrite page -->
<amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="openUrlRewriteIndexPage1"/>
<waitForPageLoad stepKey="waitForUrlRewritePage1"/>
<actionGroup ref="AdminOpenUrlRewritesGridPageActionGroup" stepKey="openUrlRewriteIndexPage1"/>
<comment userInput="Adding the comment to replace action for preserving backward compatibility" stepKey="waitForUrlRewritePage1"/>
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters1"/>
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="{{FirstLevelSubCat.name_lwr}}2/{{SimpleSubCategory.name_lwr}}.html" stepKey="fillCategoryUrlKey1"/>
<actionGroup ref="AdminClickSearchInGridActionGroup" stepKey="clickOrderApplyFilters1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
</assertEquals>

<!-- Open Url Rewrite page and see the url rewrite for the moved category -->
<amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="openUrlRewriteIndexPage"/>
<waitForPageLoad stepKey="waitForUrlRewritePageLoad"/>
<actionGroup ref="AdminOpenUrlRewritesGridPageActionGroup" stepKey="openUrlRewriteIndexPage"/>
<comment userInput="Adding the comment to replace action for preserving backward compatibility" stepKey="waitForUrlRewritePageLoad"/>
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters"/>
<waitForElementVisible selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" stepKey="waitForCategoryUrlKey"/>
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="{{SecondLevelSubCat.name_lwr}}.html" stepKey="fillCategoryUrlKey"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="clickSaveButton"/>
<actionGroup ref="AssertAdminCategorySaveSuccessMessageActionGroup" stepKey="assertSuccessMessage"/>

<!--Open UrlRewrite Page-->
<amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="openUrlRewriteIndexPage"/>
<waitForPageLoad stepKey="waitForUrlRewritePage"/>
<actionGroup ref="AdminOpenUrlRewritesGridPageActionGroup" stepKey="openUrlRewriteIndexPage"/>
<comment userInput="Adding the comment to replace action for preserving backward compatibility" stepKey="waitForUrlRewritePage"/>

<!--Verify Updated Category UrlKey-->
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?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="AdminOpenUrlRewritesGridPageActionGroup">
<annotations>
<description>Open url rewrites grid page.</description>
</annotations>

<amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="amOnUrlRewriteIndexPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<comment userInput="BIC workaround" stepKey="loginAsAdmin"/>

<comment userInput="2. Open Marketing - SEO and Search - URL Rewrites " stepKey="commentVerifyUrlRewrite" />
<amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="amOnUrlRewriteIndexPage"/>
<actionGroup ref="AdminOpenUrlRewritesGridPageActionGroup" stepKey="amOnUrlRewriteIndexPage"/>
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters"/>
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="$createSimpleProduct.custom_attributes[url_key]$.html" stepKey="inputProductName"/>
<actionGroup ref="AdminClickSearchInGridActionGroup" stepKey="clickSearchButton"/>
Expand All @@ -105,7 +105,7 @@
</actionGroup>

<comment userInput="5. Open Marketing - SEO and Search - URL Rewrites" stepKey="commentVerifyURLAfterImport" />
<amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="amOnUrlRewriteIndexPage2"/>
<actionGroup ref="AdminOpenUrlRewritesGridPageActionGroup" stepKey="amOnUrlRewriteIndexPage2"/>
<click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="openUrlRewriteGridFilters2"/>
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="$createSimpleProduct.custom_attributes[url_key]$-new.html" stepKey="inputProductName2"/>
<actionGroup ref="AdminClickSearchInGridActionGroup" stepKey="clickSearchButton2"/>
Expand Down