Skip to content

Commit 88d3208

Browse files
authored
ENGCOM-9282: Replace repetitive actions with Action Groups in CreateProductAttributeEntityWithReservedKeysTest #34419
2 parents d14db8e + bd1e0d8 commit 88d3208

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/CreateProductAttributeEntityTest/CreateProductAttributeEntityWithReservedKeysTest.xml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,27 @@
2626
</after>
2727

2828
<!--Navigate to Stores > Attributes > Product.-->
29-
<amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="goToProductAttributesGrid"/>
29+
<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributesGrid"/>
3030

3131
<!--Create new Product Attribute as TextField, with type_id code.-->
3232
<actionGroup ref="CreateProductAttributeActionGroup" stepKey="createAttribute">
3333
<argument name="attribute" value="ProductTypeIdAttribute"/>
3434
</actionGroup>
35-
<see stepKey="seeErrorMessage" selector="{{AdminMessagesSection.errorMessage}}" userInput="Code (type_id) is a reserved key and cannot be used as attribute code."/>
35+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeErrorMessage">
36+
<argument name="messageType" value="error"/>
37+
<argument name="message" value="Code (type_id) is a reserved key and cannot be used as attribute code."/>
38+
</actionGroup>
3639

3740
<!--Navigate to Stores > Attributes > Product.-->
38-
<amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="backToProductAttributesGrid"/>
41+
<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="backToProductAttributesGrid"/>
3942

4043
<!--Create new Product Attribute as TextField, with product_type code.-->
4144
<actionGroup ref="CreateProductAttributeActionGroup" stepKey="createAttribute2">
4245
<argument name="attribute" value="ProductProductTypeAttribute"/>
4346
</actionGroup>
44-
45-
<see stepKey="seeErrorMessage2" selector="{{AdminMessagesSection.errorMessage}}" userInput="Code (product_type) is a reserved key and cannot be used as attribute code."/>
47+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeErrorMessage2">
48+
<argument name="messageType" value="error"/>
49+
<argument name="message" value="Code (product_type) is a reserved key and cannot be used as attribute code."/>
50+
</actionGroup>
4651
</test>
4752
</tests>

0 commit comments

Comments
 (0)