Skip to content

Replace repetitive actions with Action Groups in AdminCreateDuplicateCategoryTest and AdminCreateDuplicateProductTest #34410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
</actionGroup>

<!-- Assert error message -->
<see selector="{{AdminCategoryMessagesSection.errorMessage}}" userInput="The value specified in the URL Key field would generate a URL that already exists." stepKey="seeErrorMessage"/>
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeErrorMessage">
<argument name="messageType" value="error"/>
<argument name="message" value="The value specified in the URL Key field would generate a URL that already exists."/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@

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