Skip to content

[MFTF] Add AdminOpenUrlRewritesGridPageActionGroup #30839

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 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"/>
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,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"/>
<fillField selector="{{AdminDataGridHeaderSection.filterFieldInput('request_path')}}" userInput="{{SecondLevelSubCat.name_lwr}}.html" stepKey="fillCategoryUrlKey"/>
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickOrderApplyFilters"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,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
Expand Up @@ -60,9 +60,8 @@
<!-- Get Category Id -->
<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"/>

<!-- Verify third level category's Redirect Path, Target Path and Redirect Type after the URL Update -->
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@
<!-- Get Category ID -->
<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"/>

<!-- Verify third level category's Redirect Path, Target Path and Redirect Type after the URL update -->
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}"
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 @@ -50,7 +50,7 @@
<actionGroup ref="AdminLoginActionGroup" 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"/>
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickSearchButton"/>
Expand All @@ -72,7 +72,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"/>
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickSearchButton2"/>
Expand Down