diff --git a/.github/actions/run-qunit-tests/action.yml b/.github/actions/run-qunit-tests/action.yml index fbd4fefb2a9d..2aed8ae542f5 100644 --- a/.github/actions/run-qunit-tests/action.yml +++ b/.github/actions/run-qunit-tests/action.yml @@ -42,7 +42,7 @@ runs: # - name: Setup Chrome # uses: ./.github/actions/setup-chrome-headless-shell # with: - # chrome-version: '145.0.7632.67' + # chrome-version: '146.0.7680.177' # - name: Use Node.js # uses: actions/setup-node@v4 diff --git a/.github/workflows/playgrounds_tests.yml b/.github/workflows/playgrounds_tests.yml index de739bfd598a..da4f4c4d6bdd 100644 --- a/.github/workflows/playgrounds_tests.yml +++ b/.github/workflows/playgrounds_tests.yml @@ -88,7 +88,7 @@ jobs: - name: Setup Chrome uses: ./.github/actions/setup-chrome with: - chrome-version: '145.0.7632.67' + chrome-version: '146.0.7680.177' - name: Use Node.js uses: actions/setup-node@v4 diff --git a/.github/workflows/run-testcafe-on-gh-pages.yml b/.github/workflows/run-testcafe-on-gh-pages.yml index 8e7a977d0a34..9c72f22ec24c 100644 --- a/.github/workflows/run-testcafe-on-gh-pages.yml +++ b/.github/workflows/run-testcafe-on-gh-pages.yml @@ -54,7 +54,7 @@ jobs: - name: Setup Chrome uses: ./devextreme/.github/actions/setup-chrome with: - chrome-version: '145.0.7632.67' + chrome-version: '146.0.7680.177' - uses: pnpm/action-setup@v4 with: diff --git a/.github/workflows/testcafe_tests.yml b/.github/workflows/testcafe_tests.yml index a0c18b8d4536..7f9d418d2e43 100644 --- a/.github/workflows/testcafe_tests.yml +++ b/.github/workflows/testcafe_tests.yml @@ -155,7 +155,7 @@ jobs: # - name: Setup Chrome # uses: ./.github/actions/setup-chrome # with: - # chrome-version: '145.0.7632.67' + # chrome-version: '146.0.7680.177' # - name: Use Node.js # uses: actions/setup-node@v4 diff --git a/.github/workflows/visual-tests-demos.yml b/.github/workflows/visual-tests-demos.yml index 9fe341f26cf1..b8d701b6028d 100644 --- a/.github/workflows/visual-tests-demos.yml +++ b/.github/workflows/visual-tests-demos.yml @@ -631,7 +631,7 @@ jobs: - name: Setup Chrome uses: ./.github/actions/setup-chrome with: - chrome-version: '145.0.7632.67' + chrome-version: '146.0.7680.177' - name: Use Node.js uses: actions/setup-node@v4 @@ -785,7 +785,7 @@ jobs: - name: Setup Chrome uses: ./.github/actions/setup-chrome with: - chrome-version: '145.0.7632.67' + chrome-version: '146.0.7680.177' - name: Use Node.js uses: actions/setup-node@v4 @@ -913,7 +913,7 @@ jobs: - name: Setup Chrome uses: ./.github/actions/setup-chrome with: - chrome-version: '145.0.7632.67' + chrome-version: '146.0.7680.177' - name: Use Node.js uses: actions/setup-node@v4 @@ -1093,7 +1093,7 @@ jobs: - name: Setup Chrome uses: ./.github/actions/setup-chrome with: - chrome-version: '145.0.7632.67' + chrome-version: '146.0.7680.177' - name: Use Node.js uses: actions/setup-node@v4 @@ -1165,7 +1165,7 @@ jobs: - name: Setup Chrome uses: ./.github/actions/setup-chrome with: - chrome-version: '145.0.7632.67' + chrome-version: '146.0.7680.177' - name: Use Node.js uses: actions/setup-node@v4 diff --git a/.github/workflows/wrapper_tests_e2e.yml b/.github/workflows/wrapper_tests_e2e.yml index 49455e79193f..cb1bba4497e5 100644 --- a/.github/workflows/wrapper_tests_e2e.yml +++ b/.github/workflows/wrapper_tests_e2e.yml @@ -96,7 +96,7 @@ jobs: - name: Setup Chrome uses: ./.github/actions/setup-chrome with: - chrome-version: '145.0.7632.67' + chrome-version: '146.0.7680.177' - name: Use Node.js uses: actions/setup-node@v4 diff --git a/apps/demos/utils/visual-tests/testcafe-runner.ts b/apps/demos/utils/visual-tests/testcafe-runner.ts index acc415194b90..afb72009d6e4 100644 --- a/apps/demos/utils/visual-tests/testcafe-runner.ts +++ b/apps/demos/utils/visual-tests/testcafe-runner.ts @@ -79,6 +79,33 @@ async function main() { const runner = tester.createRunner(); const concurrency = (process.env.CONCURRENCY && (+process.env.CONCURRENCY)) || 1; + const getDomDebugState = ClientFunction(() => { + const activeElement = document.activeElement as HTMLElement | null; + const htmlRect = document.documentElement?.getBoundingClientRect(); + + return { + activeElementTag: activeElement?.tagName || null, + activeElementId: activeElement?.id || null, + activeElementClassName: activeElement?.className || null, + selectionType: window.getSelection()?.type || null, + selectionRangeCount: window.getSelection()?.rangeCount || 0, + htmlRect: htmlRect + ? { + top: htmlRect.top, + left: htmlRect.left, + width: htmlRect.width, + height: htmlRect.height, + } + : null, + viewport: { + width: window.innerWidth, + height: window.innerHeight, + }, + readyState: document.readyState, + url: window.location.href, + }; + }); + const reporters = ['spec-time']; if (process.env.STRATEGY === 'accessibility') { @@ -105,14 +132,45 @@ async function main() { test: { // eslint-disable-next-line no-undef before: async (t: TestController) => { - await ClientFunction(() => { - if (document.activeElement && document.activeElement !== document.body) { - (document.activeElement as HTMLElement).blur(); + try { + await ClientFunction(() => { + if (document.activeElement && document.activeElement !== document.body) { + (document.activeElement as HTMLElement).blur(); + } + window.getSelection()?.removeAllRanges(); + }).with({ boundTestRun: t })(); + + await t.hover('html', { offsetX: 1, offsetY: 1 }); + } catch (error) { + let domState = null; + + try { + domState = await getDomDebugState.with({ boundTestRun: t })(); + } catch (domStateError) { + console.error('Failed to collect DOM debug state:', domStateError); } - window.getSelection()?.removeAllRanges(); - }).with({ boundTestRun: t })(); - await t.hover('html', { offsetX: 1, offsetY: 1 }); + console.error('TestCafe before-hook failed while running blur/selection cleanup or html hover.'); + const unsafeController = t as TestController & { + testRun?: { + test?: { + name?: string; + fixture?: { + name?: string; + }; + }; + }; + }; + + console.error('Test context:', { + testName: unsafeController.testRun?.test?.name, + fixtureName: unsafeController.testRun?.test?.fixture?.name, + }); + console.error('DOM state snapshot:', domState); + console.error('Original error:', error); + + throw error; + } }, }, },