Skip to content

Commit b201f29

Browse files
datagrid change theme
1 parent 6472d61 commit b201f29

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

e2e/testcafe-devextreme/runner.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,13 @@ createTestCafe(TESTCAFE_CONFIG)
278278
await addShadowRootTree(t);
279279
}
280280

281-
const currentTheme = await getCurrentTheme(t) || 'generic.light';
282-
const newTheme = args.theme || 'generic.light';
281+
if (!componentFolder.includes('dataGrid')) {
282+
const currentTheme = await getCurrentTheme(t) || 'generic.light';
283+
const newTheme = args.theme || 'generic.light';
283284

284-
if (currentTheme !== newTheme) {
285-
await changeTheme(t, newTheme);
285+
if (currentTheme !== newTheme) {
286+
await changeTheme(t, newTheme);
287+
}
286288
}
287289
},
288290
after: async (t: TestController) => {

e2e/testcafe-devextreme/tests/accessibility/treeList/aria.ts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import TreeList from 'devextreme-testcafe-models/treeList';
22
import { createWidget } from '../../../helpers/createWidget';
33
import url from '../../../helpers/getPageUrl';
4-
import { isMaterial } from '../../../helpers/themeUtils';
54

6-
fixture`TreeList - Aria Label`.page(url(__dirname, '../../container.html'));
5+
fixture`TreeList - Aria Label`
6+
.page(url(__dirname, '../../container.html'));
77

88
const tasks = [
99
{
@@ -74,7 +74,7 @@ const options = {
7474
],
7575
};
7676

77-
test.meta({ unstable: !!isMaterial() })('Aria expanded should be toggled true on Ctrl + → keypress', async (t) => {
77+
test('Aria expanded should be toggled true on Ctrl + → keypress', async (t) => {
7878
const treeList = new TreeList('#container');
7979
const expandableRow = treeList.getDataRow(0).element;
8080
const expandableCells = [
@@ -85,11 +85,9 @@ test.meta({ unstable: !!isMaterial() })('Aria expanded should be toggled true on
8585

8686
await t
8787
.expect(treeList.getContainer().getAttribute('aria-label'))
88-
.eql(isMaterial()
89-
? 'Tree list with 3 rows and 3 columns. Press Ctrl + right arrow to expand the focused node and Ctrl + left arrow to collapse it'
90-
: 'Tree list with 1 rows and 3 columns. Press Ctrl + right arrow to expand the focused node and Ctrl + left arrow to collapse it')
88+
.eql('Tree list with 1 rows and 3 columns. Press Ctrl + right arrow to expand the focused node and Ctrl + left arrow to collapse it')
9189
.expect(expandableRow.getAttribute('aria-expanded'))
92-
.eql(isMaterial() ? 'true' : 'false');
90+
.eql('false');
9391

9492
// eslint-disable-next-line no-restricted-syntax
9593
for (const cell of expandableCells) {
@@ -106,7 +104,10 @@ test.meta({ unstable: !!isMaterial() })('Aria expanded should be toggled true on
106104
for (const cell of expandableCells) {
107105
await t.expect(cell.getAttribute('aria-expanded')).eql('true');
108106
}
109-
}).before(async () => createWidget('dxTreeList', options));
107+
}).before(async () => createWidget('dxTreeList', {
108+
...options,
109+
expandedRowKeys: [0],
110+
}));
110111

111112
test('Aria expanded should be toggled false on Ctrl + ← keypress', async (t) => {
112113
const treeList = new TreeList('#container');
@@ -138,7 +139,7 @@ test('Aria expanded should be toggled false on Ctrl + ← keypress', async (t) =
138139
for (const cell of expandableCells) {
139140
await t.expect(cell.getAttribute('aria-expanded')).eql('false');
140141
}
141-
}).before(async () => {
142-
options.expandedRowKeys = [1];
143-
await createWidget('dxTreeList', options);
144-
});
142+
}).before(async () => createWidget('dxTreeList', {
143+
...options,
144+
expandedRowKeys: [1],
145+
}));

0 commit comments

Comments
 (0)