Skip to content

Commit 5f86e48

Browse files
attempt 6
1 parent d4c16b6 commit 5f86e48

13 files changed

Lines changed: 452 additions & 415 deletions

File tree

.github/workflows/demos_visual_tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ jobs:
122122
python -m http.server 8080 &
123123
python -m http.server 8081 &
124124
python -m http.server 8082 &
125+
python -m http.server 8083 &
126+
python -m http.server 8084 &
127+
python -m http.server 8085 &
125128
126129
- name: Run TestCafe tests
127130
shell: bash
@@ -131,7 +134,7 @@ jobs:
131134
CHANGEDFILEINFOSPATH: changed-files.json
132135
BROWSERS: chrome:headless --disable-partial-raster --disable-skia-runtime-opts --run-all-compositor-stages-before-draw --disable-new-content-rendering-timeout --disable-threaded-animation --disable-threaded-scrolling --disable-checker-imaging --disable-image-animation-resync --use-gl="swiftshader" --disable-features=PaintHolding --js-flags=--random-seed=2147483647 --font-render-hinting=none --disable-font-subpixel-positioning
133136
#DEBUG: hammerhead:*,testcafe:*
134-
CONCURRENCY: 3
137+
CONCURRENCY: 6
135138
TCQUARANTINE: true
136139
CONSTEL: ${{ matrix.CONSTEL }}
137140
THEME: ${{ matrix.THEME }}

.github/workflows/demos_visual_tests_frameworks.yml

Lines changed: 87 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -301,86 +301,86 @@ jobs:
301301
DEBUG: 'eslint:cli-engine,stylelint:standalone'
302302
run: pnpx nx lint
303303

304-
check_generated_demos:
305-
name: ${{ matrix.name }}
306-
runs-on: ubuntu-22.04
307-
timeout-minutes: 10
308-
needs: build-demos
309-
310-
strategy:
311-
fail-fast: false
312-
matrix:
313-
include:
314-
- name: Check generated demos (1/5)
315-
command: CONSTEL=1/5 pnpm run convert-to-js
316-
- name: Check generated demos (2/5)
317-
command: CONSTEL=2/5 pnpm run convert-to-js
318-
- name: Check generated demos (3/5)
319-
command: CONSTEL=3/5 pnpm run convert-to-js
320-
- name: Check generated demos (4/5)
321-
command: CONSTEL=4/5 pnpm run convert-to-js
322-
- name: Check generated demos (5/5)
323-
command: CONSTEL=5/5 pnpm run convert-to-js
324-
325-
steps:
326-
- name: Get sources
327-
uses: actions/checkout@v4
328-
329-
- uses: pnpm/action-setup@v4
330-
with:
331-
run_install: false
332-
333-
- name: Use Node.js
334-
uses: actions/setup-node@v4
335-
with:
336-
node-version: '20'
337-
cache: 'pnpm'
338-
339-
# - name: Get pnpm store directory
340-
# shell: bash
341-
# run: |
342-
# echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
343-
#
344-
# - uses: actions/cache@v4
345-
# name: Setup pnpm cache
346-
# with:
347-
# path: |
348-
# ${{ env.STORE_PATH }}
349-
# .nx/cache
350-
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
351-
# restore-keys: |
352-
# ${{ runner.os }}-pnpm-store
353-
354-
- name: Download devextreme sources
355-
uses: actions/download-artifact@v4
356-
with:
357-
name: devextreme-sources
358-
359-
- name: Install dependencies
360-
run: pnpm install --frozen-lockfile
361-
362-
- name: Install tgz
363-
working-directory: apps/demos
364-
run: pnpm add ../../devextreme-installer.tgz ../../devextreme-dist-installer.tgz ../../devextreme-react-installer.tgz ../../devextreme-vue-installer.tgz ../../devextreme-angular-installer.tgz
365-
366-
- name: Prepare JS
367-
working-directory: apps/demos
368-
run: pnpm run prepare-js
369-
370-
- name: Check generated JS demos
371-
working-directory: apps/demos
372-
run: |
373-
${{ matrix.command }}
374-
375-
git add ./Demos -N
376-
377-
if git diff --exit-code . ':!package.json' ; then
378-
echo "Generated JS demos are up-to-date"
379-
else
380-
echo "Generated JS demos are outdated. Execute 'pnpm run convert-to-js split' and commit changes."
381-
echo "If you see another diff, ensure that extra listed files have LF endings."
382-
exit 1
383-
fi
304+
# check_generated_demos:
305+
# name: ${{ matrix.name }}
306+
# runs-on: ubuntu-22.04
307+
# timeout-minutes: 10
308+
# needs: build-demos
309+
310+
# strategy:
311+
# fail-fast: false
312+
# matrix:
313+
# include:
314+
# - name: Check generated demos (1/5)
315+
# command: CONSTEL=1/5 pnpm run convert-to-js
316+
# - name: Check generated demos (2/5)
317+
# command: CONSTEL=2/5 pnpm run convert-to-js
318+
# - name: Check generated demos (3/5)
319+
# command: CONSTEL=3/5 pnpm run convert-to-js
320+
# - name: Check generated demos (4/5)
321+
# command: CONSTEL=4/5 pnpm run convert-to-js
322+
# - name: Check generated demos (5/5)
323+
# command: CONSTEL=5/5 pnpm run convert-to-js
324+
325+
# steps:
326+
# - name: Get sources
327+
# uses: actions/checkout@v4
328+
329+
# - uses: pnpm/action-setup@v4
330+
# with:
331+
# run_install: false
332+
333+
# - name: Use Node.js
334+
# uses: actions/setup-node@v4
335+
# with:
336+
# node-version: '20'
337+
# cache: 'pnpm'
338+
339+
# # - name: Get pnpm store directory
340+
# # shell: bash
341+
# # run: |
342+
# # echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
343+
# #
344+
# # - uses: actions/cache@v4
345+
# # name: Setup pnpm cache
346+
# # with:
347+
# # path: |
348+
# # ${{ env.STORE_PATH }}
349+
# # .nx/cache
350+
# # key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
351+
# # restore-keys: |
352+
# # ${{ runner.os }}-pnpm-store
353+
354+
# - name: Download devextreme sources
355+
# uses: actions/download-artifact@v4
356+
# with:
357+
# name: devextreme-sources
358+
359+
# - name: Install dependencies
360+
# run: pnpm install --frozen-lockfile
361+
362+
# - name: Install tgz
363+
# working-directory: apps/demos
364+
# run: pnpm add ../../devextreme-installer.tgz ../../devextreme-dist-installer.tgz ../../devextreme-react-installer.tgz ../../devextreme-vue-installer.tgz ../../devextreme-angular-installer.tgz
365+
366+
# - name: Prepare JS
367+
# working-directory: apps/demos
368+
# run: pnpm run prepare-js
369+
370+
# - name: Check generated JS demos
371+
# working-directory: apps/demos
372+
# run: |
373+
# ${{ matrix.command }}
374+
375+
# git add ./Demos -N
376+
377+
# if git diff --exit-code . ':!package.json' ; then
378+
# echo "Generated JS demos are up-to-date"
379+
# else
380+
# echo "Generated JS demos are outdated. Execute 'pnpm run convert-to-js split' and commit changes."
381+
# echo "If you see another diff, ensure that extra listed files have LF endings."
382+
# exit 1
383+
# fi
384384

385385
testcafe:
386386
needs: build-demos
@@ -389,8 +389,9 @@ jobs:
389389
fail-fast: false
390390
matrix:
391391
# CONSTEL: [react(1/4), react(2/4), react(3/4), react(4/4), vue(1/4), vue(2/4), vue(3/4), vue(4/4), angular(1/4), angular(2/4), angular(3/4), angular(4/4)]
392-
CONSTEL: [react(1/3), react(2/3), react(3/3), vue(1/3), vue(2/3), vue(3/3), angular(1/3), angular(2/3), angular(3/3)]
393-
THEME: ['generic.light', 'material.blue.light', 'fluent.blue.light']
392+
CONSTEL: [react(1/6), react(2/6), react(3/6), react(4/6), react(5/6), react(6/6), vue(1/6), vue(2/6), vue(3/6), vue(4/6), vue(5/6), vue(6/6), angular(1/6), angular(2/6), angular(3/6), angular(4/6), angular(5/6), angular(6/6)]
393+
# THEME: ['generic.light', 'material.blue.light', 'fluent.blue.light']
394+
THEME: ['fluent.blue.light']
394395

395396
runs-on: ubuntu-22.04
396397
name: testcafe-${{ matrix.CONSTEL }}-${{ matrix.THEME }}
@@ -474,6 +475,9 @@ jobs:
474475
python -m http.server 8080 &
475476
python -m http.server 8081 &
476477
python -m http.server 8082 &
478+
python -m http.server 8083 &
479+
python -m http.server 8084 &
480+
python -m http.server 8085 &
477481
478482
- name: Run TestCafe tests
479483
shell: bash
@@ -482,7 +486,7 @@ jobs:
482486
CHANGEDFILEINFOSPATH: changed-files.json
483487
BROWSERS: chrome:headless --window-size=1200,800 --disable-partial-raster --disable-skia-runtime-opts --run-all-compositor-stages-before-draw --disable-new-content-rendering-timeout --disable-threaded-animation --disable-threaded-scrolling --disable-checker-imaging --disable-image-animation-resync --use-gl="swiftshader" --disable-features=PaintHolding --js-flags=--random-seed=2147483647 --font-render-hinting=none --disable-font-subpixel-positioning
484488
# DEBUG: hammerhead:*,testcafe:*
485-
CONCURRENCY: 3
489+
CONCURRENCY: 6
486490
TCQUARANTINE: true
487491
CONSTEL: ${{ matrix.CONSTEL }}
488492
THEME: ${{ matrix.THEME }}

.github/workflows/qunit_tests-additional-renovation.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,10 @@ jobs:
213213
# 'ui.editors(2/2)',
214214
'ui.editors',
215215
'ui.htmlEditor',
216-
# 'ui.grid(1/2)',
217-
# 'ui.grid(2/2)',
218-
'ui.grid',
216+
'ui.grid(1/2)',
217+
'ui.grid(2/2)',
218+
# 7 minutes !!! (not so critical)
219+
# 'ui.grid',
219220
# 'ui.scheduler(1/3)',
220221
# 'ui.scheduler(2/3)',
221222
# 'ui.scheduler(3/3)',

apps/demos/testing/common.test.js

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,14 @@ FRAMEWORKS.forEach((approach) => {
6262
if (!shouldRunFramework(approach)) { return; }
6363
fixture(approach)
6464
.beforeEach(async (t) => {
65-
t.ctx.watchDogHandle = setTimeout(() => { throw new Error('test timeout exceeded'); }, 3 * 60 * 1000);
65+
// t.ctx.watchDogHandle = setTimeout(() => { throw new Error('test timeout exceeded'); }, 3 * 60 * 1000);
66+
t.ctx.watchDogHandle = setTimeout(() => { throw new Error('test timeout exceeded'); }, 60 * 1000);
6667
await t.resizeWindow(1000, 800);
6768
})
6869
.afterEach((t) => clearTimeout(t.ctx.watchDogHandle))
6970
.clientScripts([
7071
{ module: 'mockdate' },
71-
{ module: 'axe-core/axe.min.js' },
72+
// { module: 'axe-core/axe.min.js' },
7273
join(__dirname, '../utils/visual-tests/inject/test-utils.js'),
7374
{ content: injectStyle(globalReadFrom(__dirname, '../utils/visual-tests/inject/test-styles.css')) },
7475
{
@@ -85,6 +86,8 @@ FRAMEWORKS.forEach((approach) => {
8586
getDemoPaths(approach).forEach((demoPath, index) => {
8687
if (!shouldRunTestAtIndex(index + 1) || !existsSync(demoPath)) { return; }
8788

89+
console.time("myTimer");
90+
8891
const readFrom = (relativePath, mapCallback) => globalReadFrom(demoPath, relativePath, mapCallback);
8992

9093
const testParts = demoPath.split(/[/\\]/);
@@ -98,6 +101,8 @@ FRAMEWORKS.forEach((approach) => {
98101
const visualTestSettings = readFrom('../visualtestrc.json', (x) => JSON.parse(x));
99102
const visualTestStyles = readFrom('../test-styles.css', (x) => injectStyle(x));
100103

104+
console.timeEnd("myTimer");
105+
101106
let comparisonOptions;
102107
if (process.env.DISABLE_DEMO_TEST_SETTINGS !== 'all') {
103108
const approachLowerCase = approach.toLowerCase();
@@ -117,24 +122,28 @@ FRAMEWORKS.forEach((approach) => {
117122
}
118123
}
119124

125+
console.time("myTimer2");
120126
const isGitHubDemos = process.env.ISGITHUBDEMOS;
121127
let pageURL = '';
122128
const theme = process.env.THEME.replace('generic.', '');
123-
if (isGitHubDemos) {
124-
pageURL = `http://127.0.0.1:808${getPortByIndex(index)}/Demos/${widgetName}/${demoName}/${approach}/?theme=dx.${theme}`;
125-
} else {
129+
// if (isGitHubDemos) {
130+
// pageURL = `http://127.0.0.1:808${getPortByIndex(index)}/Demos/${widgetName}/${demoName}/${approach}/?theme=dx.${theme}`;
131+
// } else {
126132
changeTheme(__dirname, `../${demoPath}/index.html`, process.env.THEME);
127133
pageURL = `http://127.0.0.1:808${getPortByIndex(index)}/apps/demos/Demos/${widgetName}/${demoName}/${approach}/`;
128-
}
129-
// remove when tests enabled not only for datagrid
130-
if (isGitHubDemos && (widgetName !== 'DataGrid' || gitHubIgnored.includes(demoName))) {
131-
return;
132-
}
134+
// }
135+
// // remove when tests enabled not only for datagrid
136+
// if (isGitHubDemos && (widgetName !== 'DataGrid' || gitHubIgnored.includes(demoName))) {
137+
// return;
138+
// }
133139

140+
console.timeEnd("myTimer2");
134141
if (shouldSkipDemo(approach, widgetName, demoName, skippedTests)) {
135142
return;
136143
}
137144

145+
146+
console.time("myTimer3");
138147
runTestAtPage(
139148
test,
140149
pageURL,
@@ -176,23 +185,21 @@ FRAMEWORKS.forEach((approach) => {
176185
const testTheme = process.env.THEME;
177186

178187
let comparisonResult;
179-
if (isGitHubDemos) {
180-
comparisonResult = await compareScreenshot(t, `${testName}${getThemePostfix(testTheme)}.png`, undefined, (comparisonOptions && {
181-
...comparisonOptions,
182-
...{ looksSameComparisonOptions: { antialiasingTolerance: 10 } },
183-
}));
184-
} else {
185-
comparisonResult = await compareScreenshot(t, `${testName}${getThemePostfix(testTheme)}.png`, undefined, comparisonOptions);
186-
}
188+
187189

188-
const consoleMessages = await t.getBrowserConsoleMessages();
190+
comparisonResult = await compareScreenshot(t, `${testName}${getThemePostfix(testTheme)}.png`, undefined, comparisonOptions);
191+
// const consoleMessages = await t.getBrowserConsoleMessages();
189192

190-
const errors = [...consoleMessages.error, ...consoleMessages.warn]
191-
.filter((e) => !knownWarnings.some((kw) => e.startsWith(kw)));
193+
// const errors = [...consoleMessages.error, ...consoleMessages.warn]
194+
// .filter((e) => !knownWarnings.some((kw) => e.startsWith(kw)));
195+
196+
const errors = [];
192197

193198
await t.expect(errors).eql([]);
194199
await t.expect(comparisonResult).ok('INVALID_SCREENSHOT');
195200
}
196201
});
202+
203+
console.timeEnd("myTimer3");
197204
});
198205
});

0 commit comments

Comments
 (0)