Skip to content

Commit 4d0d274

Browse files
committed
DeleteEIntegrationEntity
1 parent 02bca98 commit 4d0d274

9 files changed

+202
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
</arguments>
17+
<fillField stepKey="fillNameField" selector="{{AddNewIntegrationSection.name}}" userInput="{{name}}"/>
18+
<fillField stepKey="fillAdminPasswordField" selector="{{AddNewIntegrationSection.password}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
19+
<!--Click the "Save" Button -->
20+
<click stepKey="clickSaveButton" selector="{{AddNewIntegrationSection.saveButton}}"/>
21+
</actionGroup>
22+
</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="{{IntegrationsGridSection.remove}}"/>
13+
<waitForElementVisible selector="{{IntegrationsGridSection.submitButton}}" stepKey="waitForConfirmButtonVisible"/>
14+
<click stepKey="clickSubmitButton" selector="{{IntegrationsGridSection.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="{{IntegrationsGridSection.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="{{IntegrationsGridSection.name}}" userInput="{{name}}" stepKey="filterByName"/>
19+
<!--Click "Search" Button -->
20+
<click selector="{{IntegrationsGridSection.search}}" stepKey="doFilter"/>
21+
<waitForPageLoad stepKey="waitForSitemapPageLoadedAfterFiltering"/>
22+
</actionGroup>
23+
</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="{{IntegrationsGridSection.messageByType(messageType)}}" stepKey="waitForMessage"/>
17+
<see userInput="{{message}}" selector="{{IntegrationsGridSection.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="{{IntegrationsGridSection.rowByIndex('1')}}" stepKey="donSeeIntegration"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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="IntegrationsGridSection">
12+
<element name="add" type="button" selector=".add"/>
13+
<element name="messageByType" type="block" selector="#messages .message-{{messageType}}" parameterized="true"/>
14+
<element name="name" type="input" selector="#integrationGrid_filter_name"/>
15+
<element name="search" type="input" selector=".admin__filter-actions button[title=Search]"/>
16+
<element name="remove" type="button" selector=".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+
</section>
20+
21+
<section name="AddNewIntegrationSection">
22+
<element name="name" type="input" selector="#integration_properties_name"/>
23+
<element name="password" type="input" selector="#integration_properties_current_password"/>
24+
<element name="saveButton" type="button" selector="#save-split-button-button"/>
25+
</section>
26+
</sections>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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+
</actionGroup>
34+
</before>
35+
<after>
36+
<actionGroup ref="logout" stepKey="logout"/>
37+
</after>
38+
39+
<!-- TEST BODY -->
40+
<!-- Find Created Integration In Grid -->
41+
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findCreatedIntegration">
42+
<argument name="name" value="Integration1"/>
43+
</actionGroup>
44+
<!-- Delete Created Integration Entity -->
45+
<actionGroup ref="AdminDeleteIntegrationEntityActionGroup" stepKey="deleteIntegration"/>
46+
<!-- Assert Success Message -->
47+
<actionGroup ref="AssertAdminMessageCreateIntegrationEntityActionGroup" stepKey="seeSuccessMessage">
48+
<argument name="message" value="The integration 'Integration1' has been deleted."/>
49+
<argument value="success" name="messageType"/>
50+
</actionGroup>
51+
<!-- Assert Deleted Integration Is Not In Grid -->
52+
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findDeletedIntegration">
53+
<argument name="name" value="Integration1"/>
54+
</actionGroup>
55+
<actionGroup ref="AssertDeletedIntegrationIsNotInGridActionGroup" stepKey="dontSeeIntegration">
56+
<argument name="name" value="Integration1"/>
57+
</actionGroup>
58+
</test>
59+
</tests>

dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/DeleteIntegrationEntityTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<data name="integration/dataset" xsi:type="string">default</data>
1212
<constraint name="Magento\Integration\Test\Constraint\AssertIntegrationSuccessDeleteMessage" />
1313
<constraint name="Magento\Integration\Test\Constraint\AssertIntegrationNotInGrid" />
14+
<data name="tag" xsi:type="string">mftf_migrated:yes</data>
1415
</variation>
1516
</testCase>
1617
</config>

0 commit comments

Comments
 (0)