|
| 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="AdminReAuthorizeTokensIntegrationEntityTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Integration"/> |
| 14 | + <stories value="System Integration"/> |
| 15 | + <title value="Reauthorise Integration's Tokens"/> |
| 16 | + <description value="ReAuthorising Tokens For Created Integration"/> |
| 17 | + <group value="integration"/> |
| 18 | + <group value="mtf_migrated"/> |
| 19 | + <testCaseId value="MC-14397"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 23 | + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToIntegrationsPage"> |
| 24 | + <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> |
| 25 | + <argument name="submenuUiId" value="{{AdminMenuSystemExtensionsIntegrations.dataUiId}}"/> |
| 26 | + </actionGroup> |
| 27 | + <actionGroup ref="AdminNavigateToCreateIntegrationPageActionGroup" stepKey="clickAddNewIntegrationButton"/> |
| 28 | + <actionGroup ref="AdminFillIntegrationFormActionGroup" stepKey="createIntegration"> |
| 29 | + <argument name="integration" value="defaultIntegrationData"/> |
| 30 | + <argument name="password" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> |
| 31 | + </actionGroup> |
| 32 | + <actionGroup ref="AdminIntegrationSaveAndActivateActionGroup" stepKey="clickSaveAndActivateButton"/> |
| 33 | + <actionGroup ref="AdminAllowResourcesAccessIntegrationActionGroup" stepKey="allowAccess"/> |
| 34 | + </before> |
| 35 | + <after> |
| 36 | + <actionGroup ref="AdminNavigateMenuActionGroup" stepKey="returnToIntegrationsPage"> |
| 37 | + <argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> |
| 38 | + <argument name="submenuUiId" value="{{AdminMenuSystemExtensionsIntegrations.dataUiId}}"/> |
| 39 | + </actionGroup> |
| 40 | + <actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="searchForReAuthorizedIntegration"> |
| 41 | + <argument name="name" value="{{defaultIntegrationData.name}}"/> |
| 42 | + </actionGroup> |
| 43 | + <actionGroup ref="AdminDeleteIntegrationEntityActionGroup" stepKey="deleteCreatedIntegration"/> |
| 44 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 45 | + </after> |
| 46 | + |
| 47 | + <grabValueFrom selector="{{AdminNewIntegrationSection.consumerKey}}" stepKey="grabConsumerKey"/> |
| 48 | + <grabValueFrom selector="{{AdminNewIntegrationSection.consumerSecret}}" stepKey="grabConsumerSecret"/> |
| 49 | + <grabValueFrom selector="{{AdminNewIntegrationSection.accessToken}}" stepKey="grabAccessToken"/> |
| 50 | + <grabValueFrom selector="{{AdminNewIntegrationSection.accessTokenSecret}}" stepKey="grabAccessTokenSecret"/> |
| 51 | + <actionGroup ref="AdminAllowResourcesAccessIntegrationActionGroup" stepKey="clickDoneButton"/> |
| 52 | + <actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findCreatedIntegration"> |
| 53 | + <argument name="name" value="{{defaultIntegrationData.name}}"/> |
| 54 | + </actionGroup> |
| 55 | + <actionGroup ref="AdminIntegrationClickReauthoriseLinkOnGridActionGroup" stepKey="clickReauthoriseLink"/> |
| 56 | + <actionGroup ref="AdminAllowResourcesAccessIntegrationActionGroup" stepKey="clickReauthoriseButton"/> |
| 57 | + <grabValueFrom selector="{{AdminNewIntegrationSection.consumerKey}}" stepKey="grabAfterReauthorizeConsumerKey"/> |
| 58 | + <grabValueFrom selector="{{AdminNewIntegrationSection.consumerSecret}}" stepKey="grabAfterReauthorizeConsumerSecret"/> |
| 59 | + <grabValueFrom selector="{{AdminNewIntegrationSection.accessToken}}" stepKey="grabReauthorizedAccessToken"/> |
| 60 | + <grabValueFrom selector="{{AdminNewIntegrationSection.accessTokenSecret}}" stepKey="grabReauthorizedAccessTokenSecret"/> |
| 61 | + <actionGroup ref="AdminAllowResourcesAccessIntegrationActionGroup" stepKey="finishTheProcess"/> |
| 62 | + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeSuccessMessage"> |
| 63 | + <argument name="message" value="The integration '{{defaultIntegrationData.name}}' has been re-authorized."/> |
| 64 | + </actionGroup> |
| 65 | + <actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findReAuthorizedIntegration"> |
| 66 | + <argument name="name" value="{{defaultIntegrationData.name}}"/> |
| 67 | + </actionGroup> |
| 68 | + <actionGroup ref="AdminIntegrationOpenExistingEntityActionGroup" stepKey="openIntegrationEntity"/> |
| 69 | + <assertEquals stepKey="assertConsumerKey"> |
| 70 | + <actualResult type="string">$grabAfterReauthorizeConsumerKey</actualResult> |
| 71 | + <expectedResult type="const">($grabConsumerKey)</expectedResult> |
| 72 | + </assertEquals> |
| 73 | + <assertEquals stepKey="assertConsumerSecret"> |
| 74 | + <actualResult type="string">$grabAfterReauthorizeConsumerSecret</actualResult> |
| 75 | + <expectedResult type="const">($grabConsumerSecret)</expectedResult> |
| 76 | + </assertEquals> |
| 77 | + <assertNotEquals stepKey="assertNotEqualsToken"> |
| 78 | + <actualResult type="string">$grabReauthorizedAccessToken</actualResult> |
| 79 | + <expectedResult type="const">($grabAccessToken)</expectedResult> |
| 80 | + </assertNotEquals> |
| 81 | + <assertNotEquals stepKey="assertNotEqualsTokenSecret"> |
| 82 | + <actualResult type="string">$grabReauthorizedAccessTokenSecret</actualResult> |
| 83 | + <expectedResult type="const">($grabAccessTokenSecret)</expectedResult> |
| 84 | + </assertNotEquals> |
| 85 | + </test> |
| 86 | +</tests> |
0 commit comments