Skip to content

Commit 7bb812a

Browse files
committed
Refactoring AdminUpdateCustomURLRewritesPermanentTest
1 parent 8d90d12 commit 7bb812a

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertStorefrontUrlRewriteSuccessOutsideRedirectActionGroup">
12+
<annotations>
13+
<description>Assert redirect to proper URL on the Storefront.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="target_path" type="string"/>
17+
</arguments>
18+
19+
<seeInCurrentUrl url="{{target_path}}" stepKey="seePropertUrlRewrite"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCustomURLRewritesPermanentTest.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@
5151
</actionGroup>
5252

5353
<!--AssertUrlRewriteSuccessOutsideRedirect-->
54-
<amOnPage url="{{StorefrontHomePage.url}}{{customPermanentUrlRewrite.request_path}}" stepKey="amOnStorefrontPage"/>
55-
<waitForPageLoad stepKey="waitForPageLoad"/>
56-
<seeInCurrentUrl url="{{customPermanentUrlRewrite.target_path}}" stepKey="seeAssertUrlRewrite"/>
54+
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToTheStoreFront">
55+
<argument name="page" value="{{customPermanentUrlRewrite.request_path}}"/>
56+
</actionGroup>
57+
<actionGroup ref="AssertStorefrontUrlRewriteSuccessOutsideRedirectActionGroup" stepKey="seeAssertUrlRewrite">
58+
<argument name="target_path" value="{{customPermanentUrlRewrite.target_path}}"/>
59+
</actionGroup>
5760
</test>
5861
</tests>

0 commit comments

Comments
 (0)