Skip to content

Commit bd29f10

Browse files
author
joiecaquicla
committed
#1802: The three dots context menu is not closed after unsuccessful licensing from Media Gallery - removed changes in licenseActions.js and created mftf test file
1 parent d0ad033 commit bd29f10

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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="AdminStandaloneMediaGalleryUnsuccessfulLicensingTest">
12+
<annotations>
13+
<features value="AdobeStockMediaGallery"/>
14+
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1802"/>
15+
<stories value="[Story #40] User views stock license status in Media Gallery grid"/>
16+
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1054245/scenarios/3586914"/>
17+
<title value="User views stock license status in Media Gallery grid"/>
18+
<description value="User views stock license status in Media Gallery grid"/>
19+
<severity value="CRITICAL"/>
20+
<skip>
21+
<issueId value="https://github.com/magento/adobe-stock-integration/issues/1170"/>
22+
</skip>
23+
<group value="adobe_stock_media_gallery"/>
24+
</annotations>
25+
<before>
26+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
27+
<actionGroup ref="AdminAdobeStockSetConfigActionGroup" stepKey="setIncorrectAdobeSecret">
28+
<argument name="privateKey" value=""/>
29+
</actionGroup>
30+
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/>
31+
<actionGroup ref="AdminEnhancedMediaGallerySearchAdobeStockActionGroup" stepKey="openAdobeStockGrid"/>
32+
<actionGroup ref="AdminSearchImagesOnModalActionGroup" stepKey="searchForUnlicensedImage">
33+
<argument name="query" value="{{AdobeStockUnlicensedImage.id}}"/>
34+
</actionGroup>
35+
<actionGroup ref="AdminAdobeStockExpandImagePreviewActionGroup" stepKey="expandImagePreview"/>
36+
<actionGroup ref="AdminAdobeStockSavePreviewActionGroup" stepKey="saveImagePreview"/>
37+
<actionGroup ref="AdminSaveAdobeStockImagePreviewActionGroup" stepKey="confirmSaveImagePreview"/>
38+
</before>
39+
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/>
40+
<click selector="{{AdminEnhancedMediaGalleryImageActionsSection.openContextMenu}}" stepKey="openContextMenu"/>
41+
<click selector="{{AdminEnhancedMediaGalleryImageActionsSection.license}}" stepKey="licenseImage"/>
42+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear" />
43+
<switchToWindow userInput="authorization_window" stepKey="switchToCloseWindow"/>
44+
<waitForPageLoad stepKey="waitForPageLoad" />
45+
<seeElement selector="{{AdminAdobeStockSection.incorrectSecretModalText}}" stepKey="seeLoginFailed"/>
46+
<closeTab stepKey="closeAuthorizationWindow"/>
47+
<switchToPreviousTab stepKey="switchToImageGrid"/>
48+
</test>
49+
</tests>

AdobeStockImageAdminUi/view/adminhtml/web/js/mediaGallery/grid/columns/image/licenseActions.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ define([
9898
this.imageModel().addMessage('success', $.mage.__('The image has been licensed.'));
9999
}.bind(this)).fail(function (error) {
100100
if (error) {
101-
$('ul.action-menu').removeClass('_active');
102101
this.imageModel().addMessage('error', error);
103102
}
104103
}.bind(this));

0 commit comments

Comments
 (0)