Skip to content

Commit 89ec9dd

Browse files
authored
ENGCOM-9317: Replace repetitive actions with Action Groups in AdminCreateDuplicateCategoryTest and AdminCreateDuplicateProductTest #34410
2 parents 6ba55e5 + db8e9be commit 89ec9dd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateCategoryTest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
</actionGroup>
3737

3838
<!-- Assert error message -->
39-
<see selector="{{AdminCategoryMessagesSection.errorMessage}}" userInput="The value specified in the URL Key field would generate a URL that already exists." stepKey="seeErrorMessage"/>
39+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeErrorMessage">
40+
<argument name="messageType" value="error"/>
41+
<argument name="message" value="The value specified in the URL Key field would generate a URL that already exists."/>
42+
</actionGroup>
4043
</test>
4144
</tests>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateProductTest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@
5757

5858
<!-- Save the product and expect to see an error message -->
5959
<actionGroup ref="SaveProductFormNoSuccessCheckActionGroup" stepKey="tryToSaveProduct"/>
60-
<see selector="{{AdminProductFormSection.successMessage}}" userInput="The value specified in the URL Key field would generate a URL that already exists." stepKey="seeErrorMessage"/>
60+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeErrorMessage">
61+
<argument name="messageType" value="error"/>
62+
<argument name="message" value="The value specified in the URL Key field would generate a URL that already exists."/>
63+
</actionGroup>
6164
</test>
6265
</tests>

0 commit comments

Comments
 (0)