/
AdminUpdateCustomURLRewritesPermanentTest.xml
58 lines (52 loc) · 2.95 KB
/
AdminUpdateCustomURLRewritesPermanentTest.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?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="AdminUpdateCustomURLRewritesPermanentTest">
<annotations>
<stories value="Update Custom URL Rewrites"/>
<title value="Update Custom URL Rewrites, permanent"/>
<description value="Test log in to URL Rewrites and Update Custom URL Rewrites, permanent"/>
<testCaseId value="MC-5353"/>
<severity value="CRITICAL"/>
<group value="urlRewrite"/>
<group value="mtf_migrated"/>
</annotations>
<before>
<createData entity="defaultUrlRewrite" stepKey="urlRewrite"/>
<actionGroup ref="LoginAsAdmin" stepKey="loginToAdminPanel"/>
</before>
<after>
<actionGroup ref="AdminDeleteUrlRewrite" stepKey="deleteCustomUrlRewrite">
<argument name="requestPath" value="{{customPermanentUrlRewrite.request_path}}"/>
</actionGroup>
<actionGroup ref="logout" stepKey="logout"/>
</after>
<!--Search default custom url rewrite in grid-->
<actionGroup ref="AdminSearchAndSelectUrlRewriteInGrid" stepKey="searchUrlRewrite">
<argument name="requestPath" value="$$urlRewrite.request_path$$"/>
</actionGroup>
<!--Update default custom url rewrite as per requirement and verify AssertUrlRewriteSaveMessage-->
<actionGroup ref="AdminUpdateCustomUrlRewrite" stepKey="updateUrlRewrite">
<argument name="storeValue" value="Default Store View"/>
<argument name="requestPath" value="{{customPermanentUrlRewrite.request_path}}"/>
<argument name="targetPath" value="{{customPermanentUrlRewrite.target_path}}"/>
<argument name="redirectTypeValue" value="{{customPermanentUrlRewrite.redirect_type_label}}"/>
<argument name="description" value="{{customPermanentUrlRewrite.description}}"/>
</actionGroup>
<!--Search and verify updated AssertUrlRewriteInGrid-->
<actionGroup ref="AdminSearchByRequestPath" stepKey="verifyUpdatedUrlRewriteInGrid">
<argument name="redirectPath" value="{{customPermanentUrlRewrite.request_path}}"/>
<argument name="redirectType" value="{{customPermanentUrlRewrite.redirect_type_label}}"/>
<argument name="targetPath" value="{{customPermanentUrlRewrite.target_path}}"/>
</actionGroup>
<!--AssertUrlRewriteSuccessOutsideRedirect-->
<amOnPage url="{{StorefrontHomePage.url}}{{customPermanentUrlRewrite.request_path}}" stepKey="amOnStorefrontPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<seeInCurrentUrl url="{{customPermanentUrlRewrite.target_path}}" stepKey="seeAssertUrlRewrite"/>
</test>
</tests>