|
| 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="AdminCreateSwatchAttributeWithSpecialCharactersTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Catalog"/> |
| 13 | + <stories value="Create Product Attributes"/> |
| 14 | + <title value="Admin should be able to Create Swatch Attribute with special characters"/> |
| 15 | + <description value="Create Swatch Attribute with special characters"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="AC-4529"/> |
| 18 | + <group value="Catalog"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 22 | + </before> |
| 23 | + <after> |
| 24 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 25 | + </after> |
| 26 | + <!--Navigate to Product attribute page--> |
| 27 | + <actionGroup ref="AdminNavigateToNewProductAttributePageActionGroup" stepKey="navigateToNewProductAttributePage"/> |
| 28 | + <fillField userInput="test_label" selector="{{AttributePropertiesSection.DefaultLabel}}" stepKey="fillDefaultLabel"/> |
| 29 | + <selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="Text Swatch" stepKey="selectInputType"/> |
| 30 | + <click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatch"/> |
| 31 | + <waitForAjaxLoad stepKey="waitForAjaxLoad"/> |
| 32 | + <!-- Fill Swatch and Description fields for Admin --> |
| 33 | + <fillField selector="{{AttributeManageSwatchSection.swatchField('Admin')}}" userInput="test" stepKey="fillSwatchForAdmin"/> |
| 34 | + <fillField selector="{{AttributeManageSwatchSection.descriptionField('Admin')}}" userInput="test" stepKey="fillDescriptionForAdmin"/> |
| 35 | + <!-- Grab value Swatch and Description fields for Admin --> |
| 36 | + <grabValueFrom selector="{{AttributeManageSwatchSection.swatchField('Admin')}}" stepKey="grabSwatchForAdmin"/> |
| 37 | + <grabValueFrom selector="{{AttributeManageSwatchSection.descriptionField('Admin')}}" stepKey="grabDescriptionForAdmin"/> |
| 38 | + <scrollToTopOfPage stepKey="scrollToTopOfPage"/> |
| 39 | + <click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSaveAttribute"/> |
| 40 | + <waitForPageLoad stepKey="waitForAttributeToSave"/> |
| 41 | + <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage"> |
| 42 | + <argument name="ProductAttribute" value="test_label"/> |
| 43 | + </actionGroup> |
| 44 | + <!-- Check that Swatch and Description fields for Admin are not empty--> |
| 45 | + <assertNotEmpty stepKey="checkSwatchFieldForAdmin"> |
| 46 | + <actualResult type="const">$grabSwatchForAdmin</actualResult> |
| 47 | + </assertNotEmpty> |
| 48 | + <assertNotEmpty stepKey="checkDescriptionFieldForAdmin"> |
| 49 | + <actualResult type="const">$grabDescriptionForAdmin</actualResult> |
| 50 | + </assertNotEmpty> |
| 51 | + </test> |
| 52 | +</tests> |
0 commit comments