|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminVerifyCheckboxIsDisabledCreatePermanentRedirectSetNoTest"> |
| 11 | + <annotations> |
| 12 | + <features value="CatalogUrlRewrite"/> |
| 13 | + <stories value="Url rewrites"/> |
| 14 | + <title value="Verify checkbox is disabled 'Create Permanent Redirect' set 'No'"/> |
| 15 | + <description value="Verify checkbox is disabled 'Create Permanent Redirect' set 'No' on category and product edit page."/> |
| 16 | + </annotations> |
| 17 | + <before> |
| 18 | + <magentoCLI command="config:set {{DisableCreatePermanentRedirect.path}} {{DisableCreatePermanentRedirect.value}}" stepKey="enableCreatePermanentRedirect"/> |
| 19 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 20 | + <createData entity="_defaultCategory" stepKey="createDefaultCategory"/> |
| 21 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct"> |
| 22 | + <requiredEntity createDataKey="createDefaultCategory"/> |
| 23 | + </createData> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 28 | + <deleteData createDataKey="createDefaultCategory" stepKey="deleteDefaultCategory"/> |
| 29 | + <magentoCLI command="config:set {{EnableCreatePermanentRedirect.path}} {{EnableCreatePermanentRedirect.value}}" stepKey="disableCreatePermanentRedirect"/> |
| 30 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 31 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 32 | + </after> |
| 33 | + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage"> |
| 34 | + <argument name="productId" value="$$createSimpleProduct.id$$"/> |
| 35 | + </actionGroup> |
| 36 | + <scrollTo selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="scrollToSeoSection" x="0" y="-120" /> |
| 37 | + <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/> |
| 38 | + <grabValueFrom selector="{{AdminProductSEOSection.urlKeyRedirectCheckbox}}" stepKey="grabValue"/> |
| 39 | + <assertEmpty stepKey="checkUrlKeyRedirectCheckbox"> |
| 40 | + <actualResult type="string">$grabValue</actualResult> |
| 41 | + </assertEmpty> |
| 42 | + |
| 43 | + <actionGroup ref="NavigateToCreatedCategoryActionGroup" stepKey="openCreatedSubCategory"> |
| 44 | + <argument name="Category" value="$$createDefaultCategory$$"/> |
| 45 | + </actionGroup> |
| 46 | + <scrollTo selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="scrollToSeoSection1" x="0" y="-120" /> |
| 47 | + <click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="openSeoSection1"/> |
| 48 | + <grabValueFrom selector="{{AdminCategorySEOSection.UrlKeyRedirectCheckbox}}" stepKey="grabValue1"/> |
| 49 | + <assertEmpty stepKey="checkUrlKeyRedirectCheckbox1"> |
| 50 | + <actualResult type="string">$grabValue1</actualResult> |
| 51 | + </assertEmpty> |
| 52 | + </test> |
| 53 | +</tests> |
0 commit comments