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>

0 commit comments

Comments
 (0)