Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/run-qunit-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/playgrounds_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-testcafe-on-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testcafe_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/visual-tests-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wrapper_tests_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
70 changes: 64 additions & 6 deletions apps/demos/utils/visual-tests/testcafe-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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;
}
},
},
},
Expand Down
Loading