|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminDeleteProductURLRewriteEntityTest"> |
| 11 | + <annotations> |
| 12 | + <stories value="Delete Product UrlRewrite"/> |
| 13 | + <title value="Delete created product URL rewrite"/> |
| 14 | + <description value="Login as admin, create product with category and UrlRewrite, delete created URL rewrite"/> |
| 15 | + <group value="mtf_migrated"/> |
| 16 | + </annotations> |
| 17 | + |
| 18 | + <before> |
| 19 | + <actionGroup ref="LoginAsAdmin" stepKey="login"/> |
| 20 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 21 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct"> |
| 22 | + <requiredEntity createDataKey="createCategory"/> |
| 23 | + </createData> |
| 24 | + </before> |
| 25 | + <after> |
| 26 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 27 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> |
| 28 | + <actionGroup ref="logout" stepKey="logout"/> |
| 29 | + </after> |
| 30 | + |
| 31 | + <!--Filter and Select the created Product --> |
| 32 | + <actionGroup ref="AdminSearchUrlRewriteProductBySkuActionGroup" stepKey="searchProduct"> |
| 33 | + <argument name="productSku" value="$$createSimpleProduct.sku$$"/> |
| 34 | + </actionGroup> |
| 35 | + |
| 36 | + <!-- Update the Store, RequestPath, RedirectType and Description --> |
| 37 | + <actionGroup ref="AdminAddUrlRewriteForProductActionGroup" stepKey="addUrlRewrite"> |
| 38 | + <argument name="storeValue" value="Default Store View"/> |
| 39 | + <argument name="requestPath" value="{{FirstLevelSubCat.name_lwr}}/{{_defaultProduct.urlKey}}.html"/> |
| 40 | + <argument name="redirectTypeValue" value="Temporary (302)"/> |
| 41 | + <argument name="description" value="End To End Test"/> |
| 42 | + </actionGroup> |
| 43 | + |
| 44 | + <!--Delete Created Rewrite, Assert Success Message --> |
| 45 | + <actionGroup ref="AdminDeleteUrlRewriteActionGroup" stepKey="deleteCreatedRewrite"> |
| 46 | + <argument name="requestPath" value="{{FirstLevelSubCat.name_lwr}}/{{_defaultProduct.urlKey}}.html"/> |
| 47 | + </actionGroup> |
| 48 | + <!-- Assert Deleted Rewrite is Not in Grid --> |
| 49 | + <actionGroup ref="AdminSearchDeletedUrlRewriteActionGroup" stepKey="searchDeletedURLRewriteInGrid"> |
| 50 | + <argument name="requestPath" value="{{FirstLevelSubCat.name_lwr}}/{{_defaultProduct.urlKey}}.html"/> |
| 51 | + </actionGroup> |
| 52 | + <!-- Assert Page By Url Rewrite is Not Found --> |
| 53 | + <actionGroup ref="AssertPageByUrlRewriteIsNotFoundActionGroup" stepKey="amOnPage"> |
| 54 | + <argument name="requestPath" value="{{FirstLevelSubCat.name_lwr}}/{{_defaultProduct.urlKey}}.html"/> |
| 55 | + </actionGroup> |
| 56 | + </test> |
| 57 | +</tests> |
0 commit comments