|
| 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" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="CreateProductAttributeEntityTextFieldTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Create Product Attributes"/> |
| 15 | + <title value="Admin should be able to create a TextField product attribute"/> |
| 16 | + <description value="Admin should be able to create a TextField product attribute"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MC-10894"/> |
| 19 | + <group value="Catalog"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 23 | + </before> |
| 24 | + <after> |
| 25 | + <actionGroup ref="navigateToEditProductAttribute" stepKey="goToEditPage"> |
| 26 | + <argument name="ProductAttribute" value="{{textProductAttribute.attribute_code}}"/> |
| 27 | + </actionGroup> |
| 28 | + <click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/> |
| 29 | + <click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/> |
| 30 | + <waitForPageLoad stepKey="waitForDeletion"/> |
| 31 | + </after> |
| 32 | + |
| 33 | + <!--Navigate to Stores > Attributes > Product.--> |
| 34 | + <amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="goToProductAttributes"/> |
| 35 | + |
| 36 | + <!--Create new Product Attribute as TextField, with code and default value.--> |
| 37 | + <actionGroup ref="createProductAttributeWithTextField" stepKey="key1"> |
| 38 | + <argument name="attribute" value="textProductAttribute"/> |
| 39 | + </actionGroup> |
| 40 | + |
| 41 | + <!--Save Product Attribute.--> |
| 42 | + <actionGroup ref="navigateToEditProductAttribute" stepKey="goToEditPage"> |
| 43 | + <argument name="ProductAttribute" value="{{textProductAttribute.attribute_code}}"/> |
| 44 | + </actionGroup> |
| 45 | + |
| 46 | + <!--Perform appropriate assertions against textProductAttribute entity--> |
| 47 | + <seeInField stepKey="assertLabel" selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="{{textProductAttribute.attribute_code}}"/> |
| 48 | + <seeOptionIsSelected stepKey="assertInputType" selector="{{AttributePropertiesSection.InputType}}" userInput="{{textProductAttribute.frontend_input}}"/> |
| 49 | + <seeOptionIsSelected stepKey="assertRequired" selector="{{AttributePropertiesSection.ValueRequired}}" userInput="{{textProductAttribute.is_required_admin}}"/> |
| 50 | + <seeInField stepKey="assertAttrCode" selector="{{AdvancedAttributePropertiesSection.AttributeCode}}" userInput="{{textProductAttribute.attribute_code}}"/> |
| 51 | + <seeInField stepKey="assertDefaultValue" selector="{{AdvancedAttributePropertiesSection.DefaultValueText}}" userInput="{{textProductAttribute.default_value}}"/> |
| 52 | + </test> |
| 53 | +</tests> |
0 commit comments