Skip to content

Commit cdb6e7e

Browse files
committed
REFACTOR: Extract Action Groups to separate files (MFTF best practices)
1 parent 2f46384 commit cdb6e7e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminFormSaveAndClose">
12+
<annotations>
13+
<description>Clicks on 'Save and Close'. Validates that the Success Message is present.</description>
14+
</annotations>
15+
16+
<click selector="{{AdminProductFormActionSection.saveArrow}}" stepKey="openSaveDropDown"/>
17+
<click selector="{{AdminProductFormActionSection.saveAndClose}}" stepKey="clickOnSaveAndClose"/>
18+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveMessageSuccess"/>
19+
</actionGroup>
20+
<actionGroup name="AdminFormSaveAndDuplicate">
21+
<annotations>
22+
<description>Clicks on 'Save and Duplicate'. Validates that the Success Message is present and correct.</description>
23+
</annotations>
24+
25+
<click selector="{{AdminProductFormActionSection.saveArrow}}" stepKey="openSaveDropDown"/>
26+
<click selector="{{AdminProductFormActionSection.saveAndDuplicate}}" stepKey="clickOnSaveAndDuplicate"/>
27+
<see selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveSuccess" userInput="You saved the product."/>
28+
<see selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertDuplicateSuccess" userInput="You duplicated the product."/>
29+
</actionGroup>
30+
</actionGroups>

0 commit comments

Comments
 (0)