Skip to content

Commit 715c9c4

Browse files
committed
ACP2E-2909: dynamic-rows.js:658 Uncaught TypeError: dataRecord.slice while editing bundle products
- Added the test coverage.
1 parent f00853f commit 715c9c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dev/tests/js/jasmine/tests/app/code/Magento/Bundle/adminhtml/js/components/bundle-dynamic-rows.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ define(['Magento_Bundle/js/components/bundle-dynamic-rows', 'uiRegistry', 'uiCol
3030
describe('test removeBundleItemsFromOption method', function () {
3131
it('Check if bundle items are removed from option', function () {
3232
let bundleSelections = new uiCollection;
33+
bundleSelections._elems = {
34+
clear: jasmine.createSpy('clear')
35+
}
3336

3437
spyOn(bundleSelections, 'destroyChildren').and.callThrough();
3538
spyOn(registry, 'get').and.returnValue(bundleSelections);
@@ -39,6 +42,7 @@ define(['Magento_Bundle/js/components/bundle-dynamic-rows', 'uiRegistry', 'uiCol
3942

4043
expect(registry.get).toHaveBeenCalledWith('dynamic.1.bundle_selections');
4144
expect(bundleSelections.destroyChildren).toHaveBeenCalled();
45+
expect(bundleSelections._elems.clear).toHaveBeenCalled();
4246
});
4347
});
4448
});

0 commit comments

Comments
 (0)