Skip to content

Commit 43f008d

Browse files
committed
refactoring, review changes
1 parent 9727fee commit 43f008d

11 files changed

+138
-68
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCategoriesExpandAllActionGroup">
11+
<arguments>
12+
<argument name="category" defaultValue="_defaultCategory"/>
13+
</arguments>
14+
<click selector="{{AdminCategorySidebarTreeSection.expandAll}}" stepKey="clickExpandAll"/>
15+
</actionGroup>
16+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCategoriesOpenCategoryActionGroup">
11+
<arguments>
12+
<argument name="category" defaultValue="_defaultCategory"/>
13+
</arguments>
14+
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(category.name)}}" stepKey="clickCategoryLink"/>
15+
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCategoriesOpenContentSectionActionGroup">
11+
<waitForElementVisible selector="{{AdminCategoryContentSection.sectionHeader}}" stepKey="waitForContentSection"/>
12+
<conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/>
13+
<waitForPageLoad stepKey="waitForContentSectionLoad"/>
14+
</actionGroup>
15+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCategoriesSetDisplayModeActionGroup">
11+
<arguments>
12+
<argument name="value" type="string"/>
13+
</arguments>
14+
<waitForElementVisible selector="{{AdminCategoryDisplaySettingsSection.settingsHeader}}" stepKey="waitForDisplaySettingsSection"/>
15+
<conditionalClick selector="{{AdminCategoryDisplaySettingsSection.settingsHeader}}" dependentSelector="{{AdminCategoryDisplaySettingsSection.displayMode}}" visible="false" stepKey="openDisplaySettingsSection"/>
16+
<waitForPageLoad stepKey="waitForDisplaySettingsLoad"/>
17+
<selectOption stepKey="selectStaticBlockOnlyOption" userInput="{{value}}" selector="{{AdminCategoryDisplaySettingsSection.displayMode}}"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCategoriesSetStaticBlockActionGroup">
11+
<arguments>
12+
<argument name="block" defaultValue="_defaultBlock"/>
13+
</arguments>
14+
<selectOption selector="{{AdminCategoryContentSection.AddCMSBlock}}" stepKey="selectBlock" userInput="{{block.title}}"/>
15+
</actionGroup>
16+
</actionGroups>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminOpenCategoriesPageActionGroup">
11+
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="onCategoryIndexPage"/>
12+
<waitForPageLoad stepKey="waitForPageLoad" after="onCategoryIndexPage"/>
13+
</actionGroup>
14+
</actionGroups>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminSaveCategoryActionGroup">
11+
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategoryWithProducts"/>
12+
<waitForPageLoad stepKey="waitForCategorySaved"/>
13+
<see userInput="You saved the category." stepKey="seeSuccessMessage"/>
14+
</actionGroup>
15+
</actionGroups>

app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminAddCmsBlockToCategoryActionGroup.xml

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10-
<actionGroup name="AdminNavigateToCreateNewCMSBlockPageActionGroup">
10+
<actionGroup name="AdminOpenNewCmsBlockPageActionGroup">
1111
<amOnPage url="{{CmsNewBlock.url}}" stepKey="navigateToCreateNewCMSBlockPage"/>
1212
</actionGroup>
1313
</actionGroups>

app/code/Magento/Cms/Test/Mftf/Test/AdminCreateDisabledCmsBlockEntityAndAssignToCategoryTest.xml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,32 @@
1919
</annotations>
2020
<before>
2121
<createData entity="_defaultCategory" stepKey="newDefaultCategory"/>
22+
<createData entity="_defaultBlock" stepKey="newDefaultBlock"/>
2223
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2324
</before>
2425
<after>
25-
<actionGroup ref="deleteBlock" stepKey="deleteCreatedBlock">
26-
<argument name="Block" value="_defaultBlock"/>
27-
</actionGroup>
2826
<deleteData createDataKey="newDefaultCategory" stepKey="deleteCategory"/>
27+
<deleteData createDataKey="newDefaultBlock" stepKey="deleteBlock"/>
2928
<actionGroup ref="logout" stepKey="logout"/>
3029
</after>
3130

32-
<actionGroup ref="AdminNavigateToCreateNewCMSBlockPageActionGroup" stepKey="navigateToCreateNewCMSBlockPage"/>
33-
<actionGroup ref="FillOutBlockContent" stepKey="fillOutBlockContent"/>
31+
<actionGroup ref="AdminOpenCmsBlockActionGroup" stepKey="openCmsBlock">
32+
<argument name="block_id" value="$$newDefaultBlock.id$$"/>
33+
</actionGroup>
3434
<actionGroup ref="AdminSetCMSBlockDisabledActionGroup" stepKey="disableBlock"/>
3535
<actionGroup ref="saveCMSBlock" stepKey="saveCMSBlock"/>
3636

37-
<actionGroup ref="AdminOpenCMSBlocksGridActionGroup" stepKey="openCMSBlocksGrid"/>
38-
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearGridFilters"/>
39-
<actionGroup ref="SortByIdDescendingActionGroup" stepKey="sortGridByIdDescending"/>
40-
<actionGroup ref="AdminSelectCMSBlockFromGridActionGroup" stepKey="verifyBlockInGrid">
41-
<argument name="identifier" value="_defaultBlock.identifier"/>
42-
</actionGroup>
43-
44-
<actionGroup ref="AdminAddCmsBlockToCategoryActionGroup" stepKey="addCmsBlockToCategory">
37+
<actionGroup ref="AdminOpenCategoriesPageActionGroup" stepKey="openCategoriesPage"/>
38+
<actionGroup ref="AdminCategoriesExpandAllActionGroup" stepKey="expandAll"/>
39+
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory">
4540
<argument name="category" value="$$newDefaultCategory$$"/>
4641
</actionGroup>
42+
<actionGroup ref="AdminCategoriesOpenContentSectionActionGroup" stepKey="openContentSection"/>
43+
<actionGroup ref="AdminCategoriesSetStaticBlockActionGroup" stepKey="setStaticBlock"/>
44+
<actionGroup ref="AdminCategoriesSetDisplayModeActionGroup" stepKey="setDisplay">
45+
<argument name="value" value="Static block only"/>
46+
</actionGroup>
47+
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/>
4748

4849
<actionGroup ref="AssertNoTextOnCategoryFrontPageActionGroup" stepKey="assertBlockOnCategoryFrontPage">
4950
<argument name="category" value="$$newDefaultCategory$$"/>

0 commit comments

Comments
 (0)