|
| 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="AdminAddCustomAttributeWithoutAttributeSetToProductTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Catalog"/> |
| 13 | + <stories value="Add Custom Attribute Without Attribute Set To Product"/> |
| 14 | + <title value="Admin should be able to create a attribute without attrinute set"/> |
| 15 | + <description value="Admin should be able to create a attribute without attrinute set"/> |
| 16 | + <severity value="BLOCKER"/> |
| 17 | + <testCaseId value="MC-27235"/> |
| 18 | + <group value="Catalog"/> |
| 19 | + <group value="mtf_migrated"/> |
| 20 | + </annotations> |
| 21 | + |
| 22 | + <before> |
| 23 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 24 | + </before> |
| 25 | + <after> |
| 26 | + <actionGroup ref="NavigateToEditProductAttributeActionGroup" stepKey="goToEditPage"> |
| 27 | + <argument name="ProductAttribute" value="{{textProductAttribute.attribute_code}}"/> |
| 28 | + </actionGroup> |
| 29 | + <click stepKey="clickDelete" selector="{{AttributePropertiesSection.DeleteAttribute}}"/> |
| 30 | + <click stepKey="clickOk" selector="{{AttributeDeleteModalSection.confirm}}"/> |
| 31 | + <waitForPageLoad stepKey="waitForDeletion"/> |
| 32 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 33 | + <argument name="indices" value=""/> |
| 34 | + </actionGroup> |
| 35 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 36 | + </after> |
| 37 | + <!--Navigate to Stores > Attributes > Product.--> |
| 38 | + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes"/> |
| 39 | + <!--Create new Product Attribute as TextField, with code and default value.--> |
| 40 | + <actionGroup ref="CreateProductAttributeWithTextFieldActionGroup" stepKey="createAttribute"> |
| 41 | + <argument name="attribute" value="textProductAttribute"/> |
| 42 | + </actionGroup> |
| 43 | + <!--Go to New Product page, add Attribute and check values--> |
| 44 | + <amOnPage url="{{AdminProductCreatePage.url('4', 'simple')}}" stepKey="goToCreateSimpleProductPage"/> |
| 45 | + <actionGroup ref="AddProductAttributeInProductModalActionGroup" stepKey="addAttributeToProduct"> |
| 46 | + <argument name="attributeCode" value="{{textProductAttribute.attribute_code}}"/> |
| 47 | + </actionGroup> |
| 48 | + <click stepKey="openAttributes" selector="{{AdminProductAttributesSection.sectionHeader}}"/> |
| 49 | + <waitForElementVisible selector="{{AdminProductAttributesSection.attributeTextInputByCode(textProductAttribute.attribute_code)}}" stepKey="waitforLabel"/> |
| 50 | + <see stepKey="checkLabel" selector="{{AdminProductAttributesSection.attributeLabelByCode(textProductAttribute.attribute_code)}}" userInput="{{textProductAttribute.attribute_code}}"/> |
| 51 | + </test> |
| 52 | +</tests> |
0 commit comments