Skip to content

Commit 93dc963

Browse files
ENGCOM-6396: MFTF: Extract Action Groups to separate files - magento/module-import-export #25822
2 parents 47f23ad + 70e2ba4 commit 93dc963

File tree

3 files changed

+45
-24
lines changed

3 files changed

+45
-24
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="AdminCheckDataForImportProductActionGroup">
12+
<arguments>
13+
<argument name="behavior" type="string" defaultValue="Add/Update"/>
14+
<argument name="importFile" type="string"/>
15+
</arguments>
16+
<amOnPage url="{{AdminImportIndexPage.url}}" stepKey="goToImportIndexPage"/>
17+
<waitForPageLoad stepKey="adminImportMainSectionLoad"/>
18+
<selectOption selector="{{AdminImportMainSection.entityType}}" userInput="Products" stepKey="selectProductsOption"/>
19+
<waitForElementVisible selector="{{AdminImportMainSection.importBehavior}}" stepKey="waitForImportBehaviorElementVisible"/>
20+
<selectOption selector="{{AdminImportMainSection.importBehavior}}" userInput="{{behavior}}" stepKey="selectImportBehaviorOption"/>
21+
<attachFile selector="{{AdminImportMainSection.selectFileToImport}}" userInput="{{importFile}}" stepKey="attachFileForImport"/>
22+
<click selector="{{AdminImportHeaderSection.checkDataButton}}" stepKey="clickCheckDataButton"/>
23+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
24+
</actionGroup>
25+
</actionGroups>

app/code/Magento/ImportExport/Test/Mftf/ActionGroup/AdminImportProductsActionGroup.xml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,4 @@
3636
<see selector="{{AdminImportValidationMessagesSection.notice}}" userInput="{{importNoticeMessage}}" stepKey="seeNoticeMessage"/>
3737
<see selector="{{AdminImportValidationMessagesSection.messageByType(importMessageType)}}" userInput="{{importMessage}}" stepKey="seeImportMessage"/>
3838
</actionGroup>
39-
40-
<actionGroup name="AdminImportProductsWithCheckValidationResultActionGroup" extends="AdminImportProductsActionGroup">
41-
<arguments>
42-
<argument name="validationNoticeMessage" type="string"/>
43-
<argument name="validationMessage" type="string" defaultValue="File is valid! To start import process press &quot;Import&quot; button"/>
44-
</arguments>
45-
<waitForElementVisible selector="{{AdminImportValidationMessagesSection.notice}}" after="clickCheckDataButton" stepKey="waitForValidationNoticeMessage"/>
46-
<see selector="{{AdminImportValidationMessagesSection.notice}}" userInput="{{validationNoticeMessage}}" after="waitForValidationNoticeMessage" stepKey="seeValidationNoticeMessage"/>
47-
<see selector="{{AdminImportValidationMessagesSection.success}}" userInput="{{validationMessage}}" after="seeValidationNoticeMessage" stepKey="seeValidationMessage"/>
48-
</actionGroup>
49-
<actionGroup name="AdminCheckDataForImportProductActionGroup">
50-
<arguments>
51-
<argument name="behavior" type="string" defaultValue="Add/Update"/>
52-
<argument name="importFile" type="string"/>
53-
</arguments>
54-
<amOnPage url="{{AdminImportIndexPage.url}}" stepKey="goToImportIndexPage"/>
55-
<waitForPageLoad stepKey="adminImportMainSectionLoad"/>
56-
<selectOption selector="{{AdminImportMainSection.entityType}}" userInput="Products" stepKey="selectProductsOption"/>
57-
<waitForElementVisible selector="{{AdminImportMainSection.importBehavior}}" stepKey="waitForImportBehaviorElementVisible"/>
58-
<selectOption selector="{{AdminImportMainSection.importBehavior}}" userInput="{{behavior}}" stepKey="selectImportBehaviorOption"/>
59-
<attachFile selector="{{AdminImportMainSection.selectFileToImport}}" userInput="{{importFile}}" stepKey="attachFileForImport"/>
60-
<click selector="{{AdminImportHeaderSection.checkDataButton}}" stepKey="clickCheckDataButton"/>
61-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
62-
</actionGroup>
6339
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="AdminImportProductsWithCheckValidationResultActionGroup" extends="AdminImportProductsActionGroup">
12+
<arguments>
13+
<argument name="validationNoticeMessage" type="string"/>
14+
<argument name="validationMessage" type="string" defaultValue="File is valid! To start import process press &quot;Import&quot; button"/>
15+
</arguments>
16+
<waitForElementVisible selector="{{AdminImportValidationMessagesSection.notice}}" after="clickCheckDataButton" stepKey="waitForValidationNoticeMessage"/>
17+
<see selector="{{AdminImportValidationMessagesSection.notice}}" userInput="{{validationNoticeMessage}}" after="waitForValidationNoticeMessage" stepKey="seeValidationNoticeMessage"/>
18+
<see selector="{{AdminImportValidationMessagesSection.success}}" userInput="{{validationMessage}}" after="seeValidationNoticeMessage" stepKey="seeValidationMessage"/>
19+
</actionGroup>
20+
</actionGroups>

0 commit comments

Comments
 (0)