Skip to content

Commit aa926b0

Browse files
authored
TagBox - should not throw an error on selectAll click when hideSelectedItems is enabled (T1278816)
1 parent 8ccd7a0 commit aa926b0

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
51 Bytes
Loading

packages/devextreme/testing/tests/DevExpress.ui.widgets.editors/tagBox.tests.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,6 +2357,25 @@ QUnit.module('showSelectionControls', moduleSetup, () => {
23572357

23582358
assert.strictEqual(loadSpy.callCount, 1, 'selected items are correct');
23592359
});
2360+
2361+
QUnit.test('Should not throw an error on selectAll click when hideSelectedItems is enabled (T1278816)', function(assert) {
2362+
$('#tagBox').dxTagBox({
2363+
items: [1, 2, 3, 4],
2364+
showSelectionControls: true,
2365+
hideSelectedItems: true,
2366+
opened: true,
2367+
});
2368+
2369+
this.clock.tick(TIME_TO_WAIT);
2370+
2371+
try {
2372+
$(`.${SELECT_ALL_CHECKBOX_CLASS}`).trigger('dxclick');
2373+
2374+
assert.ok(true, 'no error is thrown');
2375+
} catch(error) {
2376+
assert.ok(false, `error is thrown: ${error}`);
2377+
}
2378+
});
23602379
});
23612380

23622381
QUnit.module('keyboard navigation', {

0 commit comments

Comments
 (0)