Skip to content

Commit 57a2aad

Browse files
authored
Merge pull request #5082 from magento-pangolin/MTF-MFTF-migration-kozan
[Community MTF to MFTF] Test conversion delivery
2 parents 9544fb2 + af1b9e4 commit 57a2aad

23 files changed

+653
-3
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
12+
<!--Fill Required Fields -->
13+
<actionGroup name="AdminCreatesNewIntegrationActionGroup">
14+
<arguments>
15+
<argument name="name" type="string"/>
16+
<argument name="password" type="string"/>
17+
</arguments>
18+
<fillField stepKey="fillNameField" selector="{{AdminNewIntegrationSection.name}}" userInput="{{name}}"/>
19+
<fillField stepKey="fillAdminPasswordField" selector="{{AdminNewIntegrationSection.password}}" userInput="{{password}}"/>
20+
</actionGroup>
21+
</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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminDeleteIntegrationEntityActionGroup">
12+
<click stepKey="clickRemoveButon" selector="{{AdminIntegrationsGridSection.remove}}"/>
13+
<waitForElementVisible selector="{{AdminIntegrationsGridSection.submitButton}}" stepKey="waitForConfirmButtonVisible"/>
14+
<click stepKey="clickSubmitButton" selector="{{AdminIntegrationsGridSection.submitButton}}"/>
15+
<waitForPageLoad stepKey="waitForPageLoad"/>
16+
</actionGroup>
17+
</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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
12+
<!--Click the "Add New Integration" Button -->
13+
14+
<actionGroup name="AdminNavigateToCreateIntegrationPageActionGroup">
15+
<click stepKey="clickAddNewIntegrationButton" selector="{{AdminIntegrationsGridSection.add}}"/>
16+
<waitForPageLoad stepKey="waitForNewNIntegrationPageLoaded"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 23 additions & 0 deletions
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminSearchIntegrationInGridActionGroup">
12+
<arguments>
13+
<argument name="name" type="string"/>
14+
</arguments>
15+
<!--Reset Search Filters -->
16+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
17+
<!--Fill Integration Name Field -->
18+
<fillField selector="{{AdminIntegrationsGridSection.name}}" userInput="{{name}}" stepKey="filterByName"/>
19+
<!--Click "Search" Button -->
20+
<click selector="{{AdminIntegrationsGridSection.search}}" stepKey="doFilter"/>
21+
<waitForPageLoad stepKey="waitForSitemapPageLoadedAfterFiltering"/>
22+
</actionGroup>
23+
</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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
12+
<actionGroup name="AdminSubmitNewIntegrationFormActionGroup">
13+
<!--Click the "Save" Button -->
14+
<click stepKey="clickSaveButton" selector="{{AdminNewIntegrationSection.saveButton}}"/>
15+
<waitForPageLoad stepKey="waitForPageLoad"/>
16+
</actionGroup>
17+
</actionGroups>
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertAdminMessageCreateIntegrationEntityActionGroup">
12+
<arguments>
13+
<argument name="message" type="string" defaultValue="The integration '{{name}}' has been saved."/>
14+
<argument name="messageType" type="string" defaultValue="success"/>
15+
</arguments>
16+
<waitForElementVisible selector="{{AdminIntegrationsGridSection.messageByType(messageType)}}" stepKey="waitForMessage"/>
17+
<see userInput="{{message}}" selector="{{AdminIntegrationsGridSection.messageByType(messageType)}}" stepKey="verifyMessage"/>
18+
</actionGroup>
19+
</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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertDeletedIntegrationIsNotInGridActionGroup">
12+
<arguments>
13+
<argument name="name" type="string"/>
14+
</arguments>
15+
<dontSee userInput="{{name}}" selector="{{AdminIntegrationsGridSection.rowByIndex('1')}}" stepKey="donSeeIntegration"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
11+
<section name="AdminIntegrationsGridSection">
12+
<element name="add" type="button" selector=".page-actions .add"/>
13+
<element name="messageByType" type="block" selector="#messages .message-{{messageType}}" parameterized="true"/>
14+
<element name="name" type="input" selector=".data-grid-filters #integrationGrid_filter_name"/>
15+
<element name="search" type="input" selector=".admin__filter-actions button[title=Search]"/>
16+
<element name="remove" type="button" selector=".data-grid .delete"/>
17+
<element name="submitButton" type="button" selector=".action-primary.action-accept" timeout="30"/>
18+
<element name="rowByIndex" type="text" selector="tr[data-role='row']:nth-of-type({{var1}})" parameterized="true" timeout="30"/>
19+
<element name="edit" type="button" selector=".data-grid .edit"/>
20+
</section>
21+
</sections>
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
<section name="AdminNewIntegrationSection">
11+
<element name="name" type="input" selector="#integration_properties_name"/>
12+
<element name="password" type="input" selector="#integration_properties_current_password"/>
13+
<element name="saveButton" type="button" selector=".page-actions #save-split-button-button"/>
14+
<element name="endpoint" type="input" selector="#integration_properties_endpoint"/>
15+
<element name="linkUrl" type="input" selector="#integration_properties_identity_link_url"/>
16+
<element name="save" type="button" selector=".page-actions-buttons .save"/>
17+
</section>
18+
</sections>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminDeleteIntegrationEntityTest">
12+
<annotations>
13+
<features value="Integration"/>
14+
<stories value="System Integration"/>
15+
<title value="Admin system integration"/>
16+
<description value="Admin Deletes Created Integration"/>
17+
<group value="integration"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
<before>
21+
<!-- Login As Admin -->
22+
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
23+
<!-- Navigate To Integrations Page -->
24+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToIntegrationsPage">
25+
<argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/>
26+
<argument name="submenuUiId" value="{{AdminMenuSystemExtensionsIntegrations.dataUiId}}"/>
27+
</actionGroup>
28+
<!-- Click the "Add New Integration" button -->
29+
<actionGroup ref="AdminNavigateToCreateIntegrationPageActionGroup" stepKey="clickAddNewIntegrationButton"/>
30+
<!-- Create New Integration -->
31+
<actionGroup ref="AdminCreatesNewIntegrationActionGroup" stepKey="createIntegration">
32+
<argument name="name" value="Integration1"/>
33+
<argument name="password" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
34+
</actionGroup>
35+
<!-- Submit The Form -->
36+
<actionGroup ref="AdminSubmitNewIntegrationFormActionGroup" stepKey="submitTheForm"/>
37+
</before>
38+
<after>
39+
<actionGroup ref="logout" stepKey="logout"/>
40+
</after>
41+
42+
<!-- TEST BODY -->
43+
<!-- Find Created Integration In Grid -->
44+
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findCreatedIntegration">
45+
<argument name="name" value="Integration1"/>
46+
</actionGroup>
47+
<!-- Delete Created Integration Entity -->
48+
<actionGroup ref="AdminDeleteIntegrationEntityActionGroup" stepKey="deleteIntegration"/>
49+
<!-- Assert Success Message -->
50+
<actionGroup ref="AssertAdminMessageCreateIntegrationEntityActionGroup" stepKey="seeSuccessMessage">
51+
<argument name="message" value="The integration 'Integration1' has been deleted."/>
52+
<argument value="success" name="messageType"/>
53+
</actionGroup>
54+
<!-- Assert Deleted Integration Is Not In Grid -->
55+
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findDeletedIntegration">
56+
<argument name="name" value="Integration1"/>
57+
</actionGroup>
58+
<actionGroup ref="AssertDeletedIntegrationIsNotInGridActionGroup" stepKey="dontSeeIntegration">
59+
<argument name="name" value="Integration1"/>
60+
</actionGroup>
61+
<!-- END TEST BODY -->
62+
</test>
63+
</tests>
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminUpdateCmsPageRewriteEntityWithNoRedirectTest">
11+
<annotations>
12+
<stories value="Update CMS Page URL Redirect With No Redirect"/>
13+
<title value="Update CMS Page URL Redirect With No Redirect"/>
14+
<description value="Login as Admin and tried to update the created URL Rewrite for CMS page"/>
15+
<group value="cMSContent"/>
16+
<group value="mtf_migrated"/>
17+
</annotations>
18+
19+
<before>
20+
<createData entity="simpleCmsPage" stepKey="createCMSPage"/>
21+
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
22+
</before>
23+
<after>
24+
<deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/>
25+
<actionGroup ref="logout" stepKey="logout"/>
26+
</after>
27+
28+
<!--Create Custom Store View-->
29+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView"/>
30+
31+
<!-- Open CMS Edit Page, Get the CMS ID and Modify Store View Option to All Store Views -->
32+
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage">
33+
<argument name="CMSPage" value="$$createCMSPage$$"/>
34+
</actionGroup>
35+
<grabFromCurrentUrl stepKey="cmsId" regex="#\/([0-9]*)?\/$#"/>
36+
<actionGroup ref="AddStoreViewToCmsPage" stepKey="updateStoreViewForCmsPage">
37+
<argument name="CMSPage" value="$$createCMSPage$$"/>
38+
<argument name="storeViewName" value="All Store Views"/>
39+
</actionGroup>
40+
41+
<!--Create CMS Page URL Redirect-->
42+
<actionGroup ref="AdminAddCustomUrlRewrite" stepKey="addCustomUrlRewrite">
43+
<argument name="customUrlRewriteValue" value="Custom"/>
44+
<argument name="storeValue" value="Default Store View"/>
45+
<argument name="requestPath" value="created-new-cms-page"/>
46+
<argument name="redirectTypeValue" value="Permanent (301)"/>
47+
<argument name="targetPath" value="cms/page/view/page_id/{$cmsId}"/>
48+
<argument name="description" value="Created New CMS Page"/>
49+
</actionGroup>
50+
51+
<!--Search created CMS page url rewrite in grid-->
52+
<actionGroup ref="AdminSearchAndSelectUrlRewriteInGrid" stepKey="searchUrlRewrite">
53+
<argument name="requestPath" value="created-new-cms-page"/>
54+
</actionGroup>
55+
56+
<!-- Update URL Rewrite for CMS Page -->
57+
<actionGroup ref="AdminUpdateUrlRewrite" stepKey="updateUrlRewriteFirstAttempt">
58+
<argument name="storeValue" value="{{customStore.name}}"/>
59+
<argument name="requestPath" value="newrequestpath"/>
60+
<argument name="redirectTypeValue" value="No"/>
61+
<argument name="description" value="test_description_custom_store"/>
62+
</actionGroup>
63+
64+
<!-- Assert Url Rewrite Save Message -->
65+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSuccessMessage">
66+
<argument name="message" value="The URL Rewrite has been saved."/>
67+
</actionGroup>
68+
69+
<!-- Assert Url Rewrite Cms Page Redirect -->
70+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomepage"/>
71+
<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="storefrontSwitchToCustomStoreView">
72+
<argument name="storeView" value="customStore"/>
73+
</actionGroup>
74+
<actionGroup ref="navigateToStorefrontForCreatedPage" stepKey="navigateToTheStoreFront">
75+
<argument name="page" value="newrequestpath"/>
76+
</actionGroup>
77+
<actionGroup ref="AssertStoreFrontCMSPage" stepKey="assertCMSPage">
78+
<argument name="cmsTitle" value="$$createCMSPage.title$$"/>
79+
<argument name="cmsContent" value="$$createCMSPage.content$$"/>
80+
<argument name="cmsContentHeading" value="$$createCMSPage.content_heading$$"/>
81+
</actionGroup>
82+
83+
<actionGroup ref="AdminDeleteUrlRewrite" stepKey="deleteCustomUrlRewrite">
84+
<argument name="requestPath" value="newrequestpath"/>
85+
</actionGroup>
86+
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteCustomStoreView"/>
87+
88+
</test>
89+
</tests>

0 commit comments

Comments
 (0)