File tree Expand file tree Collapse file tree 5 files changed +22
-20
lines changed
view/adminhtml/web/js/components/grid/column/preview Expand file tree Collapse file tree 5 files changed +22
-20
lines changed Original file line number Diff line number Diff line change 10
10
<resources >
11
11
<resource id =" Magento_Backend::admin" >
12
12
<resource id =" Magento_Backend::system" >
13
- <resource id =" Magento_AdobeStockAsset::adobe_stock_asset" title =" Adobe Stock" translate =" title" sortOrder =" 5" >
14
- <resource id =" Magento_AdobeStockAsset::actions" title =" Actions" translate =" title" >
13
+ <resource id =" Magento_AdobeStockAsset::adobe_stock_asset" title =" Adobe Stock WebAPI " translate =" title" sortOrder =" 5" >
14
+ <resource id =" Magento_AdobeStockAsset::actions" title =" WebAPI Actions" translate =" title" >
15
15
<resource id =" Magento_AdobeStockAsset::actions_delete" title =" Delete" translate =" title" />
16
16
<resource id =" Magento_AdobeStockAsset::actions_save" title =" Save" translate =" title" />
17
17
<resource id =" Magento_AdobeStockAsset::actions_view" title =" View" translate =" title" />
Original file line number Diff line number Diff line change 25
25
<element name =" recordsFound" type =" text" selector =" //*[@id='adobe-stock-images-search-modal']//*[text()='records found']/parent::div" />
26
26
<element name =" mediaGalleryImage" type =" button" selector =" //img[contains(@alt,'{{imageName}}')]" parameterized =" true" />
27
27
<element name =" mediaGalleryDeleteButton" type =" button" selector =" [data-ui-id=wysiwyg-images-content-delete-files-button]" />
28
- <element name =" systemAclActions" type =" checkbox" selector =" //a[text()='Adobe Stock']/parent::li[contains(.,'Actions')]//a" />
29
28
<element name =" adobeImsACL" type =" checkbox" selector =" //a[text()='Adobe IMS']" />
30
29
<element name =" adobeSignIn" type =" button" selector =" .adobe-sign-in-button" />
31
30
<element name =" adobeImsPopupUserEmail" type =" button" selector =" #adobeid_username" />
Original file line number Diff line number Diff line change 17
17
<description value =" User controls access to Adobe Stock images from Admin Panel in ACL" />
18
18
<testCaseId value =" https://app.hiptest.com/projects/131313/test-plan/folders/943908/scenarios/3218882" />
19
19
<severity value =" MAJOR" />
20
- <group value =" adobe_stock_integration_configuration " />
20
+ <group value =" adobe_stock_integration " />
21
21
</annotations >
22
22
<before >
23
23
<actionGroup ref =" AdminLoginActionGroup" stepKey =" loginAsAdminBefore" />
24
- <actionGroup ref =" AdminAdobeStockSetConfigActionGroup" stepKey =" setCorrectModuleConfig" />
25
24
</before >
26
25
<after >
27
26
<actionGroup ref =" AdminLoginActionGroup" stepKey =" loginAsAdminAfter" />
47
46
<argument name =" User" value =" adminRole" />
48
47
<argument name =" restrictedRole" value =" Adobe Stock" />
49
48
</actionGroup >
50
- <scrollTo selector =" {{AdminAdobeStockSection.systemAclActions}}" x =" 0" y =" -100" stepKey =" scrollToResourceElement" />
51
- <click stepKey =" clickAdobeSystemActions" selector =" {{AdminAdobeStockSection.systemAclActions}}" />
52
-
53
49
<actionGroup ref =" AdminAddRestrictedRoleActionGroup" stepKey =" addRestrictedRoleAddEditNewPages" >
54
50
<argument name =" User" value =" adminRole" />
55
51
<argument name =" restrictedRole" value =" Pages" />
Original file line number Diff line number Diff line change 9
9
<tests xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/testSchema.xsd" >
10
10
<test name =" AdminMediaGalleryPageSavedPreviewAddSelectedTest" >
11
11
<annotations >
12
+ <skip >
13
+ <issueId value =" https://github.com/magento/adobe-stock-integration/issues/1817" />
14
+ </skip >
12
15
<features value =" AdobeStockImagePanel" />
13
16
<stories value =" [Story #4] User selects saved image preview in Page" />
14
17
<useCaseId value =" https://github.com/magento/adobe-stock-integration/issues/1688" />
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ define([
180
180
if ( path !== '' ) {
181
181
this . imageDirectory ( ) . locateNode ( path ) ;
182
182
}
183
- this . selectRecord ( this . getRecordFromMediaGalleryProvider ( assetDetails . path ) ) ;
183
+ this . selectRecordFromMediaGalleryProvider ( assetDetails . path ) ;
184
184
} . bind ( this ) ) ;
185
185
186
186
} ,
@@ -203,23 +203,27 @@ define([
203
203
} ,
204
204
205
205
/**
206
- * Get image data by image file name
206
+ * Select record by image file name
207
207
*
208
208
* @param {String } path
209
- * @returns {null|Object }
210
209
*/
211
- getRecordFromMediaGalleryProvider : function ( path ) {
212
- var report = null ;
210
+ selectRecordFromMediaGalleryProvider : function ( path ) {
211
+ var subscription ;
213
212
214
- this . imageItems . each ( function ( item ) {
215
- if ( item . path === path ) {
216
- report = item ;
213
+ subscription = this . imageItems . subscribe ( function ( items ) {
214
+ subscription . dispose ( ) ;
215
+ items . each ( function ( item ) {
216
+ if ( item . path === path ) {
217
+ this . selectRecord ( item ) ;
217
218
218
- return false ;
219
- }
220
- } ) ;
219
+ return false ;
220
+ }
221
+ } . bind ( this ) ) ;
222
+ } . bind ( this ) ) ;
221
223
222
- return report ;
224
+ setTimeout ( function ( ) {
225
+ subscription . dispose ( ) ;
226
+ } , 1500 ) ;
223
227
} ,
224
228
225
229
/**
You can’t perform that action at this time.
0 commit comments