Skip to content

Commit 5567df1

Browse files
shanthiManjusha.S
authored andcommitted
MC-27235:Add custom attribute without attribute set to product
1 parent f2a62ff commit 5567df1

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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

Comments
 (0)