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 1010 <resources >
1111 <resource id =" Magento_Backend::admin" >
1212 <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" >
1515 <resource id =" Magento_AdobeStockAsset::actions_delete" title =" Delete" translate =" title" />
1616 <resource id =" Magento_AdobeStockAsset::actions_save" title =" Save" translate =" title" />
1717 <resource id =" Magento_AdobeStockAsset::actions_view" title =" View" translate =" title" />
Original file line number Diff line number Diff line change 2525 <element name =" recordsFound" type =" text" selector =" //*[@id='adobe-stock-images-search-modal']//*[text()='records found']/parent::div" />
2626 <element name =" mediaGalleryImage" type =" button" selector =" //img[contains(@alt,'{{imageName}}')]" parameterized =" true" />
2727 <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" />
2928 <element name =" adobeImsACL" type =" checkbox" selector =" //a[text()='Adobe IMS']" />
3029 <element name =" adobeSignIn" type =" button" selector =" .adobe-sign-in-button" />
3130 <element name =" adobeImsPopupUserEmail" type =" button" selector =" #adobeid_username" />
Original file line number Diff line number Diff line change 1717 <description value =" User controls access to Adobe Stock images from Admin Panel in ACL" />
1818 <testCaseId value =" https://app.hiptest.com/projects/131313/test-plan/folders/943908/scenarios/3218882" />
1919 <severity value =" MAJOR" />
20- <group value =" adobe_stock_integration_configuration " />
20+ <group value =" adobe_stock_integration " />
2121 </annotations >
2222 <before >
2323 <actionGroup ref =" AdminLoginActionGroup" stepKey =" loginAsAdminBefore" />
24- <actionGroup ref =" AdminAdobeStockSetConfigActionGroup" stepKey =" setCorrectModuleConfig" />
2524 </before >
2625 <after >
2726 <actionGroup ref =" AdminLoginActionGroup" stepKey =" loginAsAdminAfter" />
4746 <argument name =" User" value =" adminRole" />
4847 <argument name =" restrictedRole" value =" Adobe Stock" />
4948 </actionGroup >
50- <scrollTo selector =" {{AdminAdobeStockSection.systemAclActions}}" x =" 0" y =" -100" stepKey =" scrollToResourceElement" />
51- <click stepKey =" clickAdobeSystemActions" selector =" {{AdminAdobeStockSection.systemAclActions}}" />
52-
5349 <actionGroup ref =" AdminAddRestrictedRoleActionGroup" stepKey =" addRestrictedRoleAddEditNewPages" >
5450 <argument name =" User" value =" adminRole" />
5551 <argument name =" restrictedRole" value =" Pages" />
Original file line number Diff line number Diff line change 99<tests xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/testSchema.xsd" >
1010 <test name =" AdminMediaGalleryPageSavedPreviewAddSelectedTest" >
1111 <annotations >
12+ <skip >
13+ <issueId value =" https://github.com/magento/adobe-stock-integration/issues/1817" />
14+ </skip >
1215 <features value =" AdobeStockImagePanel" />
1316 <stories value =" [Story #4] User selects saved image preview in Page" />
1417 <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([
180180 if ( path !== '' ) {
181181 this . imageDirectory ( ) . locateNode ( path ) ;
182182 }
183- this . selectRecord ( this . getRecordFromMediaGalleryProvider ( assetDetails . path ) ) ;
183+ this . selectRecordFromMediaGalleryProvider ( assetDetails . path ) ;
184184 } . bind ( this ) ) ;
185185
186186 } ,
@@ -203,23 +203,27 @@ define([
203203 } ,
204204
205205 /**
206- * Get image data by image file name
206+ * Select record by image file name
207207 *
208208 * @param {String } path
209- * @returns {null|Object }
210209 */
211- getRecordFromMediaGalleryProvider : function ( path ) {
212- var report = null ;
210+ selectRecordFromMediaGalleryProvider : function ( path ) {
211+ var subscription ;
213212
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 ) ;
217218
218- return false ;
219- }
220- } ) ;
219+ return false ;
220+ }
221+ } . bind ( this ) ) ;
222+ } . bind ( this ) ) ;
221223
222- return report ;
224+ setTimeout ( function ( ) {
225+ subscription . dispose ( ) ;
226+ } , 1500 ) ;
223227 } ,
224228
225229 /**
You can’t perform that action at this time.
0 commit comments