Skip to content

Commit 4894227

Browse files
committed
Added MFTF Test remaining code for MAGETWO-67627
1 parent 363a787 commit 4894227

File tree

9 files changed

+77
-3
lines changed

9 files changed

+77
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="DeletePageByUrlKeyActionGroup">
11+
<arguments>
12+
<argument name="UrlKey" type="string"/>
13+
</arguments>
14+
<amOnPage url="{{CmsPagesPage.url}}" stepKey="amOnCMSNewPage"/>
15+
<waitForPageLoad stepKey="waitForPageLoad1"/>
16+
<click selector="{{CmsPagesPageActionsSection.select(UrlKey)}}" stepKey="clickSelect"/>
17+
<click selector="{{CmsPagesPageActionsSection.delete(UrlKey)}}" stepKey="clickDelete"/>
18+
<waitForElementVisible selector="{{CmsPagesPageActionsSection.deleteConfirm}}" stepKey="waitForOkButtonToBeVisible"/>
19+
<click selector="{{CmsPagesPageActionsSection.deleteConfirm}}" stepKey="clickOkButton"/>
20+
<waitForPageLoad stepKey="waitForPageLoad3"/>
21+
<see userInput="The page has been deleted." stepKey="seeSuccessMessage"/>
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="CmsNewPageHierarchySection">
12+
<element name="header" type="button" selector="div[data-index=hierarchy]" timeout="30"/>
13+
<element name="selectHierarchy" type="button" selector="//a/span[contains(text(),'{{var1}}')]" parameterized="true" timeout="30"/>
14+
</section>
15+
</sections>
16+
17+
18+
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+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="CmsNewPagePiwSection">
12+
<element name="header" type="button" selector="div[data-index=websites]" timeout="30"/>
13+
<element name="selectStoreView" type="select" selector="//option[contains(text(),'{{var1}}')]" parameterized="true"/>
14+
</section>
15+
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/CmsPagesPageActionsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,7 @@
2525
<element name="firstItemEditButton" type="button" selector=".data-grid .action-select-wrap .action-menu-item[data-action~='item-edit']"/>
2626
<element name="activeFilter" type="button" selector="(//div[contains(@class, 'admin__data-grid-filters-current') and contains(@class, '_show')])[1]"/>
2727
<element name="savePageSuccessMessage" type="text" selector=".message-success"/>
28+
<element name="delete" type="button" selector="//div[text()='{{var1}}']/parent::td//following-sibling::td[@class='data-grid-actions-cell']//a[text()='Delete']" parameterized="true"/>
29+
<element name="deleteConfirm" type="button" selector=".action-primary.action-accept" timeout="60"/>
2830
</section>
2931
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Data/StoreData.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,14 @@
3939
<data key="store_type">group</data>
4040
<requiredEntity type="storeGroup">customStoreGroup</requiredEntity>
4141
</entity>
42+
<entity name="staticStore" type="store">
43+
<!--data key="group_id">customStoreGroup.id</data-->
44+
<data key="name" >Second Store View</data>
45+
<data key="code" >store123</data>
46+
<data key="is_active">1</data>
47+
<data key="store_id">null</data>
48+
<data key="store_action">add</data>
49+
<data key="store_type">group</data>
50+
<requiredEntity type="storeGroup">customStoreGroup</requiredEntity>
51+
</entity>
4252
</entities>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Data/StoreGroupData.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,10 @@
2121
<data key="store_action">add</data>
2222
<data key="store_type">group</data>
2323
</entity>
24+
<entity name="staticStoreGroup" type="group">
25+
<data key="name">NewStore</data>
26+
<data key="code">Base12</data>
27+
<data key="root_category_id">2</data>
28+
<data key="website_id">1</data>
29+
</entity>
2430
</entities>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewStoreViewActionsSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
<element name="backButton" type="button" selector="#back" timeout="30"/>
1111
<element name="delete" type="button" selector="#delete" timeout="30"/>
1212
<element name="resetButton" type="button" selector="#reset" timeout="30"/>
13-
<element name="saveButton" type="button" selector="#save" timeout="30"/>
13+
<element name="saveButton" type="button" selector="#save" timeout="60"/>
1414
</section>
1515
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminNewWebsiteActionsSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
-->
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
99
<section name="AdminNewWebsiteActionsSection">
10-
<element name="saveWebsite" type="button" selector="#save" timeout="30"/>
10+
<element name="saveWebsite" type="button" selector="#save" timeout="60"/>
1111
</section>
1212
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Section/AdminStoreGroupActionsSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
-->
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
99
<section name="AdminStoreGroupActionsSection">
10-
<element name="saveButton" type="button" selector="#save" timeout="30" />
10+
<element name="saveButton" type="button" selector="#save" timeout="60" />
1111
</section>
1212
</sections>

0 commit comments

Comments
 (0)