Skip to content

Commit cc75fc1

Browse files
authored
Merge pull request #22 from magento-tsg/MQE-2527
[Sidecar] MQE-2527: Create automated test for: "User enables and disables Enhanced Media Gallery and Adobe Stock Integration"
2 parents 7943266 + 0e61df6 commit cc75fc1

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

AdobeStockImageAdminUi/Test/Mftf/Data/AdobeStockConfigData.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,14 @@
2323
<data key="path">adobe_ims/integration/private_key</data>
2424
<data key="value">{{_CREDS.magento/adobe_stock_private_key}}</data>
2525
</entity>
26+
<entity name="AdobeStockIntegrationEnable">
27+
<data key="path">system/adobe_stock_integration/enabled</data>
28+
<data key="label">Yes</data>
29+
<data key="value">1</data>
30+
</entity>
31+
<entity name="AdobeStockIntegrationDisable">
32+
<data key="path">system/adobe_stock_integration/enabled</data>
33+
<data key="label">No</data>
34+
<data key="value">0</data>
35+
</entity>
2636
</entities>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminAdobeStockEnablesDisablesEnhancedMediaGalleryTest">
11+
<annotations>
12+
<features value="AdobeStockImageAdminUi"/>
13+
<stories value="Enables and disables Enhanced Media Gallery"/>
14+
<title value="User enables and disables Enhanced Media Gallery and Adobe Stock Integration"/>
15+
<description value="User enables and disables Enhanced Media Gallery and Adobe Stock Integration"/>
16+
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1326"/>
17+
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/943908/scenarios/4847771"/>
18+
<severity value="CRITICAL"/>
19+
<group value="adobe_stock_integration"/>
20+
</annotations>
21+
<before>
22+
<!-- Enable Old Media Gallery -->
23+
<magentoCLI command="config:set {{MediaGalleryConfigDataDisabled.path}} {{MediaGalleryConfigDataDisabled.value}}" stepKey="enabledOldMediaGallery"/>
24+
25+
<!-- Clean cache -->
26+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
27+
<argument name="tags" value="config block_html"/>
28+
</actionGroup>
29+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
30+
</before>
31+
<after>
32+
<!-- Enable Old Media Gallery -->
33+
<magentoCLI command="config:set {{MediaGalleryConfigDataDisabled.path}} {{MediaGalleryConfigDataDisabled.value}}" stepKey="enableOldMediaGallery"/>
34+
35+
<!-- Enable Adobe Stock Integration -->
36+
<magentoCLI command="config:set {{AdobeStockIntegrationEnable.path}} {{AdobeStockIntegrationEnable.value}}" stepKey="enableAdobeStockIntegration"/>
37+
38+
<!-- Logout From Admin -->
39+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
40+
</after>
41+
<!-- Check to dont see media gallery button -->
42+
<actionGroup ref="AdminOpenContentMenuTabActionGroup" stepKey="openContentTab"/>
43+
<dontSeeElement selector="{{AdminMenuSection.menuItem('magento-mediagalleryui-media-gallery')}}" stepKey="dontSeeMediaGalleryMenuItem"/>
44+
<actionGroup ref="AdminCloseContentMenuTabActionGroup" stepKey="closeContentTab"/>
45+
46+
<!-- Disabled Old Media Gallery -->
47+
<magentoCLI command="config:set {{MediaGalleryConfigDataEnabled.path}} {{MediaGalleryConfigDataEnabled.value}}" stepKey="disabledOldMediaGallery"/>
48+
49+
<!-- Disabled Adobe Stock Integration -->
50+
<magentoCLI command="config:set {{AdobeStockIntegrationDisable.path}} {{AdobeStockIntegrationDisable.value}}" stepKey="disableAdobeStockIntegration"/>
51+
52+
<!-- Clean cache -->
53+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanConfigCache">
54+
<argument name="tags" value="config block_html"/>
55+
</actionGroup>
56+
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
57+
58+
<!-- Check that media gallery button is available-->
59+
<actionGroup ref="AdminOpenContentMenuTabActionGroup" stepKey="openContentTabToCheckViewMediaGallery"/>
60+
<seeElement selector="{{AdminMenuSection.menuItem('magento-mediagalleryui-media')}}" stepKey="checkIsMediaGalleryMenuItemVisible"/>
61+
</test>
62+
</tests>

0 commit comments

Comments
 (0)