Skip to content

Commit 1caa8e8

Browse files
try new settings
1 parent 9600647 commit 1caa8e8

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

apps/demos/utils/visual-tests/inject/test-styles.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ body {
44
overflow: clip;
55
}
66

7+
.dx-scrollable-scroll { visibility: hidden !important; }
8+
79
/* trying to achieve more predictable results of rendered text */
810

911
* {
10-
text-rendering: geometricprecision !important;
12+
caret-color: transparent !important;
13+
14+
/* text-rendering: geometricprecision !important; */
1115
}

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

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import createTestCafe from 'testcafe';
1+
import createTestCafe, { ClientFunction } from 'testcafe';
22
import fs from 'fs';
33

44
function reporter() {
@@ -220,7 +220,22 @@ async function main() {
220220
.browsers(process.env.BROWSERS || 'chrome --no-sandbox --disable-dev-shm-usage --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 --disable-dev-shm-usage')
221221
.concurrency(concurrency || 1)
222222
.run({
223-
quarantineMode: process.env.TCQUARANTINE ? { successThreshold: 1, attemptLimit: 5 } : false,
223+
quarantineMode: process.env.TCQUARANTINE ? { successThreshold: 1, attemptLimit: 3 } : false,
224+
// @ts-expect-error ts-error
225+
hooks: {
226+
test: {
227+
before: async (t: TestController) => {
228+
const clearFocusAndSelection = ClientFunction(() => {
229+
if (document.activeElement && document.activeElement !== document.body) {
230+
(document.activeElement as HTMLElement).blur();
231+
}
232+
window.getSelection()?.removeAllRanges();
233+
});
234+
await clearFocusAndSelection.with({ boundTestRun: t })();
235+
await t.hover('html');
236+
},
237+
},
238+
},
224239
});
225240

226241
await tester.close();

0 commit comments

Comments
 (0)