Skip to content

Commit 1bd7795

Browse files
[Magento Community Engineering] Community Contributions - 2.4-develop
- merged latest code from mainline branch
2 parents 9fa6b73 + 03a986d commit 1bd7795

File tree

50 files changed

+1138
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1138
-14
lines changed
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAllowResourcesAccessIntegrationActionGroup">
12+
<click stepKey="clickAllowButton" selector="{{AdminNewIntegrationSection.allow}}"/>
13+
<waitForPageLoad stepKey="waitForLoading"/>
14+
</actionGroup>
15+
</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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminClickEditIntegrationEntityActionGroup">
12+
<click stepKey="clickEditButton" selector="{{IntegrationsGridSection.edit}}"/>
13+
<waitForPageLoad stepKey="waitForPageLoad"/>
14+
</actionGroup>
15+
</actionGroups>
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminIntegrationClickReauthoriseLinkOnGridActionGroup">
12+
<click stepKey="clickReauthoriseLink" selector="{{AdminIntegrationsGridSection.activate}}"/>
13+
<waitForPageLoad stepKey="waitForPopupLoading"/>
14+
</actionGroup>
15+
</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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminIntegrationOpenExistingEntityActionGroup">
12+
<click stepKey="clickEditIcon" selector="{{AdminIntegrationsGridSection.edit}}"/>
13+
</actionGroup>
14+
</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="AdminIntegrationSaveAndActivateActionGroup">
11+
<click stepKey="clickIntegrationToggle" selector="{{AdminNewIntegrationFormSection.integrationToggle}}"/>
12+
<waitForElementVisible selector="{{AdminNewIntegrationFormSection.saveAndActivate}}" stepKey="waitForSaveAndActivateButton"/>
13+
<click stepKey="clickSaveAndActivateButton" selector="{{AdminNewIntegrationFormSection.saveAndActivate}}"/>
14+
<waitForPageLoad stepKey="waitForPageLoad"/>
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+
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="AdminSubmitIntegrationFormActionGroup">
13+
<!--Click the "Save" Button -->
14+
<click stepKey="clickSaveButton" selector="{{AddNewIntegrationSection.save}}"/>
15+
<waitForPageLoad stepKey="waitForPageLoad"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="AdminUpdateCreatedIntegrationEntityActionGroup">
14+
<arguments>
15+
<argument name="name" type="string"/>
16+
<argument name="password" type="string"/>
17+
<argument name="endpoint" type="string"/>
18+
<argument name="linkUrl" type="string"/>
19+
</arguments>
20+
<fillField stepKey="fillNameField" selector="{{AddNewIntegrationSection.name}}" userInput="{{name}}"/>
21+
<fillField stepKey="fillEndpiontField" selector="{{AddNewIntegrationSection.endpoint}}" userInput="{{endpoint}}"/>
22+
<fillField stepKey="fillLinkUrlField" selector="{{AddNewIntegrationSection.linkUrl}}" userInput="{{linkUrl}}"/>
23+
<fillField stepKey="fillAdminPasswordField" selector="{{AddNewIntegrationSection.password}}" userInput="{{password}}"/>
24+
</actionGroup>
25+
</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="AssertUpdatedIntegrationEntityInGridActionGroup">
12+
<arguments>
13+
<argument name="name" type="string"/>
14+
</arguments>
15+
<see userInput="{{name}}" selector="{{IntegrationsGridSection.rowByIndex('1')}}" stepKey="seeIntegrationEntity"/>
16+
</actionGroup>
17+
</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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminIntegrationDetailsSection">
12+
<element name="consumerKey" type="input" selector=".admin__field-control.control #integration_properties_consumer_key"/>
13+
<element name="consumerSecret" type="input" selector=".admin__field-control.control #integration_properties_consumer_secret"/>
14+
<element name="accessToken" type="input" selector=".admin__field-control.control #integration_properties_token"/>
15+
<element name="accessTokenSecret" type="input" selector=".admin__field-control.control #integration_properties_token_secret"/>
16+
</section>
17+
</sections>

app/code/Magento/Integration/Test/Mftf/Section/AdminIntegrationsGridSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
<element name="submitButton" type="button" selector=".action-primary.action-accept" timeout="30"/>
1818
<element name="rowByIndex" type="text" selector="tr[data-role='row']:nth-of-type({{var1}})" parameterized="true" timeout="30"/>
1919
<element name="edit" type="button" selector=".data-grid .edit"/>
20+
<element name="activate" type="button" selector="#integrationGrid_table>tbody>tr:nth-child(1)>td.col-activate>a"/>
2021
</section>
2122
</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="AddNewIntegrationSection">
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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="IntegrationsGridSection">
11+
<element name="add" type="button" selector=".page-actions .add"/>
12+
<element name="messageByType" type="block" selector="#messages .message-{{messageType}}" parameterized="true"/>
13+
<element name="name" type="input" selector=".data-grid-filters #integrationGrid_filter_name"/>
14+
<element name="search" type="input" selector=".admin__filter-actions button[title=Search]"/>
15+
<element name="remove" type="button" selector=".data-grid .delete"/>
16+
<element name="submitButton" type="button" selector=".action-primary.action-accept" timeout="30"/>
17+
<element name="rowByIndex" type="text" selector="tr[data-role='row']:nth-of-type({{var1}})" parameterized="true" timeout="30"/>
18+
<element name="edit" type="button" selector=".data-grid .edit"/>
19+
</section>
20+
</sections>

app/code/Magento/Integration/Test/Mftf/Section/AdminNewIntegrationFormSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
<element name="resourceTree" type="block" selector="[data-ui-id='integration-edit-tabs-tab-content-api-section'] [data-role='resource-tree']"/>
1919

2020
<element name="save" type="button" selector="#save-split-button-button"/>
21+
<element name="integrationToggle" type="button" selector=".page-actions-buttons .action-toggle.primary"/>
22+
<element name="saveAndActivate" type="button" selector="#save-split-button-activate"/>
2123
</section>
2224
</sections>

app/code/Magento/Integration/Test/Mftf/Section/AdminNewIntegrationSection.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,11 @@
1414
<element name="endpoint" type="input" selector="#integration_properties_endpoint"/>
1515
<element name="linkUrl" type="input" selector="#integration_properties_identity_link_url"/>
1616
<element name="save" type="button" selector=".page-actions-buttons .save"/>
17+
<element name="allow" type="button" selector=".page-actions-buttons .action-primary"/>
18+
<element name="resourcesPopup" type="block" selector="#modal-content-17 #integration-popup-container"/>
19+
<element name="consumerKey" type="input" selector=".admin__field-control.control #integration_token_consumer_key"/>
20+
<element name="consumerSecret" type="input" selector=".admin__field-control.control #integration_token_consumer_secret"/>
21+
<element name="accessToken" type="input" selector=".admin__field-control.control #integration_token_token"/>
22+
<element name="accessTokenSecret" type="input" selector=".admin__field-control.control #integration_token_token_secret"/>
1723
</section>
1824
</sections>

app/code/Magento/Integration/Test/Mftf/Test/AdminCreateIntegrationEntityWithDuplicatedNameTest.xml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
2424
</before>
2525
<after>
26+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="returnToIntegrationsPage">
27+
<argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/>
28+
<argument name="submenuUiId" value="{{AdminMenuSystemExtensionsIntegrations.dataUiId}}"/>
29+
</actionGroup>
30+
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="searchForIntegration">
31+
<argument name="name" value="{{defaultIntegrationData.name}}"/>
32+
</actionGroup>
33+
<actionGroup ref="AdminDeleteIntegrationEntityActionGroup" stepKey="deleteCreatedIntegration"/>
2634
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
2735
</after>
2836

@@ -32,18 +40,18 @@
3240
</actionGroup>
3341
<actionGroup ref="AdminNavigateToCreateIntegrationPageActionGroup" stepKey="clickAddNewIntegrationButton"/>
3442
<actionGroup ref="AdminCreatesNewIntegrationActionGroup" stepKey="createNewIntegration">
35-
<argument name="name" value="Integration1"/>
43+
<argument name="name" value="{{defaultIntegrationData.name}}"/>
3644
<argument name="password" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
3745
</actionGroup>
3846
<actionGroup ref="AdminSubmitNewIntegrationFormActionGroup" stepKey="submitTheForm"/>
3947
<actionGroup ref="AdminNavigateToCreateIntegrationPageActionGroup" stepKey="clickAddNewIntegrationButtonSecondTime"/>
4048
<actionGroup ref="AdminCreatesNewIntegrationActionGroup" stepKey="createNewIntegrationWithDuplicatedName">
41-
<argument name="name" value="Integration1"/>
49+
<argument name="name" value="{{defaultIntegrationData.name}}"/>
4250
<argument name="password" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
4351
</actionGroup>
4452
<actionGroup ref="AdminSubmitNewIntegrationFormActionGroup" stepKey="submitTheFormWithDuplicatedName"/>
4553
<actionGroup ref="AssertAdminMessageCreateIntegrationEntityActionGroup" stepKey="seeErrorMessage">
46-
<argument name="message" value="The integration with name &quot;Integration1&quot; exists."/>
54+
<argument name="message" value="The integration with name &quot;{{defaultIntegrationData.name}}&quot; exists."/>
4755
<argument value="error" name="messageType"/>
4856
</actionGroup>
4957
</test>

app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,32 @@
3131
<actionGroup ref="AdminNavigateToCreateIntegrationPageActionGroup" stepKey="clickAddNewIntegrationButton"/>
3232
<!-- Create New Integration -->
3333
<actionGroup ref="AdminCreatesNewIntegrationActionGroup" stepKey="createIntegration">
34-
<argument name="name" value="Integration1"/>
34+
<argument name="name" value="{{defaultIntegrationData.name}}"/>
3535
<argument name="password" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
3636
</actionGroup>
37-
<!-- Submit The Form -->
3837
<actionGroup ref="AdminSubmitNewIntegrationFormActionGroup" stepKey="submitTheForm"/>
3938
</before>
4039
<after>
4140
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
4241
</after>
43-
4442
<!-- TEST BODY -->
4543
<!-- Find Created Integration In Grid -->
4644
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findCreatedIntegration">
47-
<argument name="name" value="Integration1"/>
45+
<argument name="name" value="{{defaultIntegrationData.name}}"/>
4846
</actionGroup>
4947
<!-- Delete Created Integration Entity -->
5048
<actionGroup ref="AdminDeleteIntegrationEntityActionGroup" stepKey="deleteIntegration"/>
5149
<!-- Assert Success Message -->
5250
<actionGroup ref="AssertAdminMessageCreateIntegrationEntityActionGroup" stepKey="seeSuccessMessage">
53-
<argument name="message" value="The integration 'Integration1' has been deleted."/>
51+
<argument name="message" value="The integration '{{defaultIntegrationData.name}}' has been deleted."/>
5452
<argument value="success" name="messageType"/>
5553
</actionGroup>
5654
<!-- Assert Deleted Integration Is Not In Grid -->
5755
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findDeletedIntegration">
58-
<argument name="name" value="Integration1"/>
56+
<argument name="name" value="{{defaultIntegrationData.name}}"/>
5957
</actionGroup>
6058
<actionGroup ref="AssertDeletedIntegrationIsNotInGridActionGroup" stepKey="dontSeeIntegration">
61-
<argument name="name" value="Integration1"/>
59+
<argument name="name" value="{{defaultIntegrationData.name}}"/>
6260
</actionGroup>
6361
<!-- END TEST BODY -->
6462
</test>

0 commit comments

Comments
 (0)