Skip to content

Commit e7faf06

Browse files
committed
Refactoring
1 parent b00bff2 commit e7faf06

File tree

2 files changed

+29
-36
lines changed

2 files changed

+29
-36
lines changed

app/code/Magento/Integration/Test/Mftf/ActionGroup/AdminAllowResourcesAccessIntegrationActionGroup.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
1211
<actionGroup name="AdminAllowResourcesAccessIntegrationActionGroup">
1312
<click stepKey="clickAllowButton" selector="{{AdminNewIntegrationSection.allow}}"/>
1413
<waitForPageLoad stepKey="waitForLoading"/>

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

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,16 @@
1818
<group value="mtf_migrated"/>
1919
</annotations>
2020
<before>
21-
<!-- Login As Admin -->
22-
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
23-
<!-- Navigate To Integrations Page -->
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2422
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToIntegrationsPage">
2523
<argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/>
2624
<argument name="submenuUiId" value="{{AdminMenuSystemExtensionsIntegrations.dataUiId}}"/>
2725
</actionGroup>
28-
<!-- Click the "Add New Integration" button -->
2926
<actionGroup ref="AdminNavigateToCreateIntegrationPageActionGroup" stepKey="clickAddNewIntegrationButton"/>
30-
<!-- Create New Integration -->
3127
<actionGroup ref="AdminFillIntegrationFormActionGroup" stepKey="createIntegration">
3228
<argument name="integration" value="defaultIntegrationData"/>
3329
<argument name="password" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
3430
</actionGroup>
35-
<!-- Click Save And Activate Button -->
3631
<actionGroup ref="AdminIntegrationSaveAndActivateActionGroup" stepKey="clickSaveAndActivateButton"/>
3732
<actionGroup ref="AdminAllowResourcesAccessIntegrationActionGroup" stepKey="allowAccess"/>
3833
</before>
@@ -45,35 +40,34 @@
4540
<argument name="name" value="{{defaultIntegrationData.name}}"/>
4641
</actionGroup>
4742
<actionGroup ref="AdminDeleteIntegrationEntityActionGroup" stepKey="deleteCreatedIntegration"/>
48-
<actionGroup ref="logout" stepKey="logout"/>
43+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
4944
</after>
50-
<!-- TEST BODY -->
51-
<grabValueFrom selector="{{AdminNewIntegrationSection.consumerKey}}" stepKey="grabConsumerKey"/>
52-
<grabValueFrom selector="{{AdminNewIntegrationSection.consumerSecret}}" stepKey="grabConsumerSecret"/>
53-
<grabValueFrom selector="{{AdminNewIntegrationSection.accessToken}}" stepKey="grabAccessToken"/>
54-
<grabValueFrom selector="{{AdminNewIntegrationSection.accessTokenSecret}}" stepKey="grabAccessTokenSecret"/>
55-
<actionGroup ref="AdminAllowResourcesAccessIntegrationActionGroup" stepKey="clickDoneButton"/>
56-
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findCreatedIntegration">
57-
<argument name="name" value="{{defaultIntegrationData.name}}"/>
58-
</actionGroup>
59-
<actionGroup ref="AdminIntegrationClickReauthoriseLinkOnGridActionGroup" stepKey="clickReauthoriseLink"/>
60-
<actionGroup ref="AdminAllowResourcesAccessIntegrationActionGroup" stepKey="clickReauthoriseButton"/>
61-
<grabValueFrom selector="{{AdminNewIntegrationSection.consumerKey}}" stepKey="grabAfterReauthorizeConsumerKey"/>
62-
<grabValueFrom selector="{{AdminNewIntegrationSection.consumerSecret}}" stepKey="grabAfterReauthorizeConsumerSecret"/>
63-
<grabValueFrom selector="{{AdminNewIntegrationSection.accessToken}}" stepKey="grabReauthorizedAccessToken"/>
64-
<grabValueFrom selector="{{AdminNewIntegrationSection.accessTokenSecret}}" stepKey="grabReauthorizedAccessTokenSecret"/>
65-
<actionGroup ref="AdminAllowResourcesAccessIntegrationActionGroup" stepKey="finishTheProcess"/>
66-
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeSuccessMessage">
67-
<argument name="message" value="The integration '{{defaultIntegrationData.name}}' has been re-authorized."/>
68-
</actionGroup>
69-
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findReAuthorizedIntegration">
70-
<argument name="name" value="{{defaultIntegrationData.name}}"/>
71-
</actionGroup>
72-
<actionGroup ref="AdminIntegrationOpenExistingEntityActionGroup" stepKey="openIntegrationEntity"/>
73-
<!-- Compare Tokens After Reauthorizing -->
74-
<assertEquals stepKey="assertConsumerKey" expected="($grabConsumerKey)" actual="$grabAfterReauthorizeConsumerKey" actualType="string"/>
75-
<assertEquals stepKey="assertConsumerSecret" expected="($grabConsumerSecret)" actual="$grabAfterReauthorizeConsumerSecret" actualType="string"/>
76-
<assertNotEquals stepKey="assertNotEqualsToken" expected="($grabAccessToken)" actual="$grabReauthorizedAccessToken" actualType="string"/>
77-
<assertNotEquals stepKey="assertNotEqualsTokenSecret" expected="($grabAccessTokenSecret)" actual="$grabReauthorizedAccessTokenSecret" actualType="string"/>
45+
46+
<grabValueFrom selector="{{AdminNewIntegrationSection.consumerKey}}" stepKey="grabConsumerKey"/>
47+
<grabValueFrom selector="{{AdminNewIntegrationSection.consumerSecret}}" stepKey="grabConsumerSecret"/>
48+
<grabValueFrom selector="{{AdminNewIntegrationSection.accessToken}}" stepKey="grabAccessToken"/>
49+
<grabValueFrom selector="{{AdminNewIntegrationSection.accessTokenSecret}}" stepKey="grabAccessTokenSecret"/>
50+
<actionGroup ref="AdminAllowResourcesAccessIntegrationActionGroup" stepKey="clickDoneButton"/>
51+
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findCreatedIntegration">
52+
<argument name="name" value="{{defaultIntegrationData.name}}"/>
53+
</actionGroup>
54+
<actionGroup ref="AdminIntegrationClickReauthoriseLinkOnGridActionGroup" stepKey="clickReauthoriseLink"/>
55+
<actionGroup ref="AdminAllowResourcesAccessIntegrationActionGroup" stepKey="clickReauthoriseButton"/>
56+
<grabValueFrom selector="{{AdminNewIntegrationSection.consumerKey}}" stepKey="grabAfterReauthorizeConsumerKey"/>
57+
<grabValueFrom selector="{{AdminNewIntegrationSection.consumerSecret}}" stepKey="grabAfterReauthorizeConsumerSecret"/>
58+
<grabValueFrom selector="{{AdminNewIntegrationSection.accessToken}}" stepKey="grabReauthorizedAccessToken"/>
59+
<grabValueFrom selector="{{AdminNewIntegrationSection.accessTokenSecret}}" stepKey="grabReauthorizedAccessTokenSecret"/>
60+
<actionGroup ref="AdminAllowResourcesAccessIntegrationActionGroup" stepKey="finishTheProcess"/>
61+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeSuccessMessage">
62+
<argument name="message" value="The integration '{{defaultIntegrationData.name}}' has been re-authorized."/>
63+
</actionGroup>
64+
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findReAuthorizedIntegration">
65+
<argument name="name" value="{{defaultIntegrationData.name}}"/>
66+
</actionGroup>
67+
<actionGroup ref="AdminIntegrationOpenExistingEntityActionGroup" stepKey="openIntegrationEntity"/>
68+
<assertEquals stepKey="assertConsumerKey" expected="($grabConsumerKey)" actual="$grabAfterReauthorizeConsumerKey" actualType="string"/>
69+
<assertEquals stepKey="assertConsumerSecret" expected="($grabConsumerSecret)" actual="$grabAfterReauthorizeConsumerSecret" actualType="string"/>
70+
<assertNotEquals stepKey="assertNotEqualsToken" expected="($grabAccessToken)" actual="$grabReauthorizedAccessToken" actualType="string"/>
71+
<assertNotEquals stepKey="assertNotEqualsTokenSecret" expected="($grabAccessTokenSecret)" actual="$grabReauthorizedAccessTokenSecret" actualType="string"/>
7872
</test>
7973
</tests>

0 commit comments

Comments
 (0)