Skip to content

Commit 144b321

Browse files
author
marker dao ®
committed
feat(list.tests): Add tests
1 parent e47fad1 commit 144b321

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/devextreme/testing/tests/DevExpress.ui.widgets/list.markup.tests.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,23 @@ QUnit.module('decorators markup', {}, () => {
491491
assert.notStrictEqual(window.getComputedStyle($deleteToggleIcon).backgroundImage, 'none', 'background image is defined');
492492
});
493493

494+
QUnit.test('list item aria-label should be equal to item text, if showSelectionControls is true and selectionMode is multiple (T1248422)', function(assert) {
495+
const $list = $('#list').dxList({
496+
items: ['item 1'],
497+
showSelectionControls: true,
498+
selectionMode: 'multiple',
499+
});
500+
501+
const instance = $list.dxList('instance');
502+
const getItem = () => $list.find(`.${LIST_ITEM_CLASS}`).eq(0);
503+
504+
assert.strictEqual(getItem().attr('aria-label'), 'item 1', 'aria-label is correct on init');
505+
506+
instance.option({ items: ['item 2'] });
507+
508+
assert.strictEqual(getItem().attr('aria-label'), 'item 2', 'aria-label is correct if items were changed in runtime');
509+
});
510+
494511
QUnit.test('list item markup, item select decorator', function(assert) {
495512
const $list = $($('#templated-list').dxList({
496513
items: ['0'],

0 commit comments

Comments
 (0)