Skip to content

Commit 9ab3def

Browse files
committed
MC-3315: Banner/Slider: Image still display on Banner/Slider slide-out after deleted
- Updated test with CR feedback
1 parent a3683b4 commit 9ab3def

File tree

2 files changed

+7
-2
lines changed
  • app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/image
  • dev/tests/js/jasmine/tests/app/code/Magento/PageBuilder/view/adminhtml/web/js/form/element

2 files changed

+7
-2
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/image/preview.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/js/jasmine/tests/app/code/Magento/PageBuilder/view/adminhtml/web/js/form/element/image-uploader.test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,12 @@ define([
140140
});
141141
it('Should trigger an event when uploader is associated to the deleted image', function () {
142142
uploader.id = 'abc123';
143-
uploader.value = jasmine.createSpy();
143+
144+
/**
145+
* A stub function to spy on.
146+
*/
147+
uploader.value = function () {};
148+
spyOn(uploader, 'value');
144149
spyOn(uploader, 'getFileId').and.returnValue('foo');
145150

146151
uploader.onDeleteFile({}, {

0 commit comments

Comments
 (0)