Skip to content

Commit 6f95312

Browse files
authored
Merge pull request #1715 from jmonteros422/1688-saved-image-from-adobe-stock-is-selected-highlighted-but-the-add-selected-button-is-not-displayed
#1688: Saved image from Adobe Stock is selected/highlighted, but the "Add Selected" button is not displayed
2 parents 83eef83 + ee0e387 commit 6f95312

File tree

3 files changed

+74
-1
lines changed

3 files changed

+74
-1
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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="AdminMediaGalleryCategorySavedPreviewAddSelectedTest">
11+
<annotations>
12+
<features value="AdobeStockImagePanel"/>
13+
<stories value="[Story #4] User selects saved image preview in Category"/>
14+
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1688"/>
15+
<title value="User saves image preview and clicks add selection to content in Category"/>
16+
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1054245/scenarios/5068945"/>
17+
<description value="Admin should be able to save image preview and clicks add selection button"/>
18+
<severity value="CRITICAL"/>
19+
<group value="adobe_stock_media_gallery"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/>
24+
<actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromWysiwyg"/>
25+
<actionGroup ref="AdminEnhancedMediaGallerySearchAdobeStockActionGroup" stepKey="openAdobeStockPanel"/>
26+
</before>
27+
<after>
28+
<actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromWysiwyg"/>
29+
<actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="removeSavedPreview"/>
30+
</after>
31+
<actionGroup ref="AdminAdobeStockExpandImagePreviewActionGroup" stepKey="expandImagePreview"/>
32+
<actionGroup ref="AdminAdobeStockSavePreviewActionGroup" stepKey="saveImagePreview"/>
33+
<actionGroup ref="AdminSaveAdobeStockImagePreviewActionGroup" stepKey="confirmSaveImagePreview"/>
34+
<actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="addSelectedSavedPreview"/>
35+
</test>
36+
</tests>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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="AdminMediaGalleryPageSavedPreviewAddSelectedTest">
11+
<annotations>
12+
<features value="AdobeStockImagePanel"/>
13+
<stories value="[Story #4] User selects saved image preview in Page"/>
14+
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1688"/>
15+
<title value="User saves image preview and clicks add selection to content in Page"/>
16+
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1054245/scenarios/5068945"/>
17+
<description value="Admin should be able to save image preview and clicks add selection button"/>
18+
<severity value="CRITICAL"/>
19+
<group value="adobe_stock_media_gallery"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
<actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="openNewPage"/>
24+
<actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/>
25+
<actionGroup ref="AdminEnhancedMediaGallerySearchAdobeStockActionGroup" stepKey="openAdobeStockPanel"/>
26+
</before>
27+
<after>
28+
<actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGalleryForPage"/>
29+
<actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="removeSavedPreview"/>
30+
</after>
31+
<actionGroup ref="AdminAdobeStockExpandImagePreviewActionGroup" stepKey="expandImagePreview"/>
32+
<actionGroup ref="AdminAdobeStockSavePreviewActionGroup" stepKey="saveImagePreview"/>
33+
<actionGroup ref="AdminSaveAdobeStockImagePreviewActionGroup" stepKey="confirmSaveImagePreview"/>
34+
<actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="addSelectedSavedPreview"/>
35+
</test>
36+
</tests>

AdobeStockImageAdminUi/view/adminhtml/web/js/components/grid/column/preview/actions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ define([
4444
saveLicensedAndDownloadUrl: 'adobe_stock/license/saveLicensed',
4545
buyCreditsUrl: 'https://stock.adobe.com/',
4646
messageDelay: 5,
47+
mediaGallery: '',
4748
imageItems: [],
4849
messages: [],
4950
listens: {
@@ -243,7 +244,7 @@ define([
243244
* @param {Object} record
244245
*/
245246
selectRecord: function (record) {
246-
uiRegistry.get('name =' + this.mediaGallery).selected(record);
247+
uiRegistry.get('name =' + this.mediaGallery).select(record);
247248
},
248249

249250
/**

0 commit comments

Comments
 (0)