Skip to content

Commit dd7b663

Browse files
committed
ACP2E-3076: Error when deleting bundle options
1 parent 07f8767 commit dd7b663

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

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

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,37 @@
88

99
define(['Magento_Bundle/js/components/bundle-dynamic-rows', 'uiRegistry', 'uiCollection'],
1010
function (BundleDynamicRows, registry, uiCollection) {
11-
'use strict';
11+
'use strict';
1212

13-
describe('Magento_Bundle/js/components/bundle-dynamic-rows', function () {
14-
let unit;
13+
describe('Magento_Bundle/js/components/bundle-dynamic-rows', function () {
14+
let unit;
1515

16-
beforeEach(function () {
17-
unit = new BundleDynamicRows({
18-
dataScope: 'bundle-dynamic-rows',
19-
label: 'Dynamic Rows',
20-
collapsibleHeader: true,
21-
columnsHeader: false,
22-
deleteProperty: false,
23-
addButton: false,
24-
name: 'dynamic',
25-
bundleSelectionsName: 'bundle_selections'
16+
beforeEach(function () {
17+
unit = new BundleDynamicRows({
18+
dataScope: 'bundle-dynamic-rows',
19+
label: 'Dynamic Rows',
20+
collapsibleHeader: true,
21+
columnsHeader: false,
22+
deleteProperty: false,
23+
addButton: false,
24+
name: 'dynamic',
25+
bundleSelectionsName: 'bundle_selections'
26+
});
2627
});
27-
});
2828

29-
describe ('test removeBundleItemsFromOption method', function () {
30-
it('Check if bundle items are removed from option', function () {
31-
let bundleSelections = new uiCollection;
29+
describe('test removeBundleItemsFromOption method', function () {
30+
it('Check if bundle items are removed from option', function () {
31+
let bundleSelections = new uiCollection;
3232

33-
spyOn(bundleSelections, 'destroyChildren').and.callThrough();
34-
spyOn(registry, 'get').and.returnValue(bundleSelections);
35-
spyOn(unit, 'removeBundleItemsFromOption').and.callThrough();
33+
spyOn(bundleSelections, 'destroyChildren').and.callThrough();
34+
spyOn(registry, 'get').and.returnValue(bundleSelections);
35+
spyOn(unit, 'removeBundleItemsFromOption').and.callThrough();
3636

37-
unit.removeBundleItemsFromOption(1);
37+
unit.removeBundleItemsFromOption(1);
3838

39-
expect(registry.get).toHaveBeenCalledWith('dynamic.1.bundle_selections');
40-
expect(bundleSelections.destroyChildren).toHaveBeenCalled();
39+
expect(registry.get).toHaveBeenCalledWith('dynamic.1.bundle_selections');
40+
expect(bundleSelections.destroyChildren).toHaveBeenCalled();
41+
});
4142
});
4243
});
4344
});
44-
});

0 commit comments

Comments
 (0)