Skip to content

Commit

Permalink
magento/adobe-stock-integration#1833: Add ability to disable renditio…
Browse files Browse the repository at this point in the history
…ns functionality to stores configuration - additional action group and modifications on media gallery test suites
  • Loading branch information
joweecaquicla committed Sep 16, 2020
1 parent 1de7ccb commit 4e20d29
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminMediaGalleryRenditionsEnableActionGroup">
<arguments>
<argument name="enabled" type="string" defaultValue="{{MediaGalleryRenditionsDataEnabled.value}}"/>
</arguments>
<amOnPage url="{{AdminMediaGalleryConfigSystemPage.url}}" stepKey="navigateToSystemConfigurationPage" />
<waitForPageLoad stepKey="waitForPageLoad"/>
<scrollTo selector="{{AdminConfigSystemSection.mediaGalleryRenditionsFieldset}}" stepKey="scrollToMediaGalleryRenditionsFieldset"/>
<conditionalClick stepKey="expandMediaGalleryRenditionsTab" selector="{{AdminConfigSystemSection.mediaGalleryRenditionsFieldset}}" dependentSelector="{{AdminConfigSystemSection.mediaGalleryRenditionsEnabledField}}" visible="false" />
<waitForElementVisible selector="{{AdminConfigSystemSection.mediaGalleryRenditionsFieldset}}" stepKey="waitForFieldset" />
<selectOption userInput="{{enabled}}" selector="{{AdminConfigSystemSection.mediaGalleryRenditionsEnabledField}}" stepKey="enableOrDisableMediaGalleryRenditions"/>
<click selector="{{AdminConfigSystemSection.saveConfig}}" stepKey="saveConfiguration"/>
<waitForPageLoad stepKey="waitForConfigurationToSave"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@
<data key="path">system/media_gallery/enabled</data>
<data key="value">0</data>
</entity>
<entity name="MediaGalleryRenditionsDataEnabled">
<data key="path">system/media_gallery_renditions/enabled</data>
<data key="value">1</data>
</entity>
<entity name="MediaGalleryRenditionsDataDisabled">
<data key="path">system/media_gallery_renditions/enabled</data>
<data key="value">0</data>
</entity>
</entities>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<section name="AdminConfigSystemSection">
<element name="enhancedMediaGalleryFieldset" type="block" selector="#system_media_gallery-head"/>
<element name="enhancedMediaGalleryEnabledField" type="select" selector="[data-ui-id='select-groups-media-gallery-fields-enabled-value']"/>
<element name="mediaGalleryRenditionsFieldset" type="block" selector="#system_media_gallery_renditions-head"/>
<element name="mediaGalleryRenditionsEnabledField" type="select" selector="[data-ui-id='select-groups-media-gallery-renditions-fields-enabled-value']"/>
<element name="saveConfig" type="button" selector="#save"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
<suite name="MediaGalleryUiDisabledSuite">
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminMediaGalleryRenditionsEnableActionGroup" stepKey="disableMediaGalleryRenditions">
<argument name="enabled" value="0"/>
</actionGroup>
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
</before>
<after>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminMediaGalleryRenditionsEnableActionGroup" stepKey="enableMediaGalleryRenditions"/>
</after>
<include>
<group name="media_gallery_ui_disabled"/>
</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<actionGroup ref="AdminMediaGalleryEnhancedEnableActionGroup" stepKey="enableEnhancedMediaGallery">
<argument name="enabled" value="1"/>
</actionGroup>
<actionGroup ref="AdminMediaGalleryRenditionsEnableActionGroup" stepKey="enableMediaGalleryRenditions"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
</before>
<after>
Expand Down

0 comments on commit 4e20d29

Please sign in to comment.