Skip to content

Commit db8e9be

Browse files
ENGCOM-9317: Replace repetitive actions with Action Groups in AdminCreateDuplicateCategoryTest and AdminCreateDuplicateProductTest #34410
- Merge Pull Request #34410 from kate-kyzyma/magento2:Refactoring-AdminCreateDuplicateCategoryTest - Merged commits: 1. 9972de0 2. c934b51 3. ef654e5 4. 1faca01
2 parents be9b1fe + 1faca01 commit db8e9be

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)