Skip to content

Commit 6ccfd02

Browse files
author
marker dao ®
committed
feat(runners): Remove click, Add hover html with big offsets
1 parent 9e8a7f5 commit 6ccfd02

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

apps/demos/utils/visual-tests/testcafe-runner.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,14 @@ async function main() {
107107
hooks: {
108108
test: {
109109
before: async (t: TestController) => {
110-
await t.click('body', { offsetX: 0, offsetY: 0 });
111110
await ClientFunction(() => {
112111
if (document.activeElement && document.activeElement !== document.body) {
113112
(document.activeElement as HTMLElement).blur();
114113
}
115114
window.getSelection()?.removeAllRanges();
116115
}).with({ boundTestRun: t })();
116+
117+
await t.hover('html', { offsetX: -9999, offsetY: -9999 });
117118
},
118119
},
119120
},

e2e/testcafe-devextreme/runner.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,6 @@ async function main() {
264264
// @ts-expect-error ts-errors
265265
const { meta } = t.testRun.test;
266266

267-
await t.click('body', { offsetX: 0, offsetY: 0 });
268-
269267
await ClientFunction(() => {
270268
if (document.activeElement && document.activeElement !== document.body) {
271269
(document.activeElement as HTMLElement).blur();
@@ -274,7 +272,7 @@ async function main() {
274272
window.getSelection()?.removeAllRanges();
275273
}).with({ boundTestRun: t })();
276274

277-
await t.hover('html');
275+
await t.hover('html', { offsetX: -9999, offsetY: -9999 });
278276

279277
const [width, height] = meta?.browserSize || DEFAULT_BROWSER_SIZE;
280278
await t.resizeWindow(width, height);

0 commit comments

Comments
 (0)