Skip to content

Commit f3a6760

Browse files
update
1 parent 00a4db2 commit f3a6760

File tree

48 files changed

+282
-211
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+282
-211
lines changed

.github/workflows/demos_visual_tests_frameworks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
needs: check-should-run
3636
if: needs.check-should-run.outputs.should-run == 'true'
3737
env:
38-
NODE_OPTIONS: "--max-old-space-size=8192"
38+
NODE_OPTIONS: --max-old-space-size=8192
3939
timeout-minutes: 40
4040

4141
steps:
@@ -152,7 +152,7 @@ jobs:
152152
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'force all tests')
153153
working-directory: apps/demos
154154
env:
155-
NODE_OPTIONS: "--max-old-space-size=8192"
155+
NODE_OPTIONS: --max-old-space-size=8192
156156
run: pnpx nx prepare-bundles
157157

158158
- name: Demos - Run tsc

.github/workflows/qunit_tests.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,15 @@ jobs:
144144
matrix:
145145
constel: [
146146
'ui',
147-
'ui.widgets(1/3)',
148-
'ui.widgets(2/3)',
149-
'ui.widgets(3/3)',
147+
'ui.widgets(1/2)',
148+
'ui.widgets(2/2)',
150149
'ui.editors(1/2)',
151150
'ui.editors(2/2)',
152151
'ui.htmlEditor',
153-
'ui.grid(1/4)',
154-
'ui.grid(2/4)',
155-
'ui.grid(3/4)',
156-
'ui.grid(4/4)',
157-
'ui.scheduler(1/3)',
158-
'ui.scheduler(2/3)',
159-
'ui.scheduler(3/3)',
152+
'ui.grid(1/2)',
153+
'ui.grid(2/2)',
154+
'ui.scheduler(1/2)',
155+
'ui.scheduler(2/2)',
160156
'viz'
161157
]
162158

.github/workflows/testcafe_tests.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ jobs:
7070

7171
- name: Build
7272
shell: bash
73-
run: pnpx nx build devextreme
73+
env:
74+
NODE_OPTIONS: --max-old-space-size=8192
75+
run: pnpx nx build devextreme --uglify
7476

7577
- name: Zip artifacts
7678
working-directory: ./packages/devextreme
@@ -96,10 +98,9 @@ jobs:
9698
{ componentFolder: "common", name: "common" },
9799

98100
# Grids tests need to be reworked to work in fluent theme
99-
{ componentFolder: "dataGrid/common", name: "dataGrid / common (1/4)", indices: "1/4" },
100-
{ componentFolder: "dataGrid/common", name: "dataGrid / common (2/4)", indices: "2/4" },
101-
{ componentFolder: "dataGrid/common", name: "dataGrid / common (3/4)", indices: "3/4" },
102-
{ componentFolder: "dataGrid/common", name: "dataGrid / common (4/4)", indices: "4/4" },
101+
{ componentFolder: "dataGrid/common", name: "dataGrid / common (1/3)", indices: "1/3" },
102+
{ componentFolder: "dataGrid/common", name: "dataGrid / common (2/3)", indices: "2/3" },
103+
{ componentFolder: "dataGrid/common", name: "dataGrid / common (3/3)", indices: "3/3" },
103104
{ componentFolder: "dataGrid/sticky/common", name: "dataGrid / sticky common" },
104105
{ componentFolder: "dataGrid/sticky/fixed", name: "dataGrid / sticky"},
105106
{ componentFolder: "cardView", name: "cardView" },
@@ -115,8 +116,7 @@ jobs:
115116
{ componentFolder: "scheduler/timezones", name: "scheduler / timezones (Europe/Berlin)", timezone: "Europe/Berlin", theme: 'generic.light' },
116117
{ componentFolder: "scheduler/timezones", name: "scheduler / timezones (America/Los_Angeles)", timezone: "America/Los_Angeles", theme: 'generic.light' },
117118

118-
{ componentFolder: "editors", name: "editors (1/2)", indices: "1/2" },
119-
{ componentFolder: "editors", name: "editors (2/2)", indices: "2/2" },
119+
{ componentFolder: "editors", name: "editors" },
120120
{ componentFolder: "navigation", name: "navigation" },
121121
]
122122
runs-on: devextreme-shr2
@@ -175,6 +175,8 @@ jobs:
175175

176176
- name: Run TestCafe tests
177177
working-directory: ./e2e/testcafe-devextreme
178+
env:
179+
NODE_OPTIONS: --max-old-space-size=8192 --max-semi-space-size=1024
178180
run: |
179181
if [ "${{ matrix.ARGS.theme }}" != "" ]; then
180182
THEME="--theme ${{ matrix.ARGS.theme }}"

e2e/testcafe-devextreme/helpers/testPageUtils.ts

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
/* eslint-disable spellcheck/spell-checker */
2-
import { ClientFunction } from 'testcafe';
32
import {
43
removeStylesheetRulesFromPage,
54
} from './domUtils';
65

7-
export async function clearTestPage(testController: TestController): Promise<void> {
8-
const shadowDom = process.env.shadowDom === 'true';
9-
10-
const clearTestPageFn = ClientFunction(() => {
6+
export async function clearTestPage(t: TestController): Promise<void> {
7+
await t.eval(() => {
118
const widgetSelector = '.dx-widget';
129
const $elements = $(widgetSelector)
1310
.filter((_, element) => $(element).parents(widgetSelector).length === 0);
@@ -40,14 +37,9 @@ export async function clearTestPage(testController: TestController): Promise<voi
4037
`;
4138

4239
body?.prepend(temp.firstElementChild!);
43-
}, {
44-
dependencies: {
45-
shadowDom,
46-
},
4740
});
4841

49-
await clearTestPageFn.with({ boundTestRun: testController })();
50-
await removeStylesheetRulesFromPage.with({ boundTestRun: testController })();
42+
await removeStylesheetRulesFromPage.with({ boundTestRun: t })();
5143
}
5244

5345
export async function loadAxeCore(t: TestController): Promise<void> {
@@ -59,10 +51,44 @@ export async function loadAxeCore(t: TestController): Promise<void> {
5951
}
6052

6153
const script = document.createElement('script');
54+
script.id = 'axe-core-script';
6255
script.src = '../../../node_modules/axe-core/axe.min.js';
6356
// @ts-expect-error ts-error
6457
script.onload = resolve;
6558
script.onerror = reject;
6659
document.head.appendChild(script);
6760
}));
6861
}
62+
63+
export async function loadGantt(t: TestController): Promise<void> {
64+
await t.eval(() => new Promise<void>((resolve, reject) => {
65+
if (document.getElementById('dx-gantt-script')) {
66+
resolve();
67+
return;
68+
}
69+
70+
const script = document.createElement('script');
71+
script.id = 'dx-gantt-script';
72+
script.src = '../../../packages/devextreme/artifacts/js/dx-gantt.min.js';
73+
// @ts-expect-error ts-error
74+
script.onload = resolve;
75+
script.onerror = reject;
76+
document.head.appendChild(script);
77+
}));
78+
}
79+
80+
export const addShadowRootTree = async (t: TestController): Promise<void> => {
81+
await t.eval(() => {
82+
const root = document.querySelector('#parentContainer') as HTMLElement;
83+
const { childNodes } = root;
84+
85+
if (!root.shadowRoot) {
86+
root.attachShadow({ mode: 'open' });
87+
}
88+
89+
const shadowContainer = document.createElement('div');
90+
shadowContainer.append(...Array.from(childNodes));
91+
92+
root.shadowRoot!.appendChild(shadowContainer);
93+
});
94+
};

e2e/testcafe-devextreme/helpers/themeUtils.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { isString } from 'devextreme/core/utils/type';
2+
import { ClientFunction } from 'testcafe';
23
import { changeTheme } from './changeTheme';
34

45
const defaultThemeName = 'generic.light';
@@ -8,6 +9,13 @@ export const getThemePostfix = (theme?: string): string => {
89
return ` (${themeName.replace(/\./g, '-')})`;
910
};
1011

12+
export const getCurrentTheme = async (t: TestController): Promise<string> => {
13+
// eslint-disable-next-line @stylistic/max-len
14+
const currentTheme = await ClientFunction(() => (window as any).DevExpress.ui.themes.current()).with({ boundTestRun: t })();
15+
16+
return currentTheme;
17+
};
18+
1119
export const isMaterial = (): boolean => process.env.theme === 'material.blue.light';
1220

1321
export const isFluent = (): boolean => process.env.theme === 'fluent.blue.light';

0 commit comments

Comments
 (0)