steadier tests
Massimo Melina committed
Feb 21, 2026 at 21:52 UTC
21b5c36e12630784f288076bd70e34cc0bd95ad1
2 files changed
+15
-8
e2e/screenshot.css
+7
-1
@@ -2,6 +2,12 @@
2
*:focus { outline: none !important; box-shadow: none !important; }
3
main *:hover { background: none !important; }
4
* { animation: none !important; transition: none !important; }
5
+/* Disable typographic features that differ across rendering engines and cause screenshot noise. */
6
+*:not(svg):not(svg *) {
7
+ font-kerning: none !important;
8
+ font-variant-ligatures: none !important;
9
+ text-shadow: none !important;
10
+}
11
12
.hideInTests, /* use for elements with variable size, where masking would produce changes anyway */
13
.list-wrapper:not([uri="/"]) .entry-ts { display: none } /* ignore changing timestamps inside folders */
@@ -9,4 +15,4 @@ main *:hover { background: none !important; }
15
.MuiTooltip-tooltip { /* tooltips are subjected to small displacements */
16
visibility: hidden !important;
17
pointer-events: none !important;
12
-}
\ No newline at end of file
18
+}
playwright.config.ts
+8
-7
@@ -30,11 +30,6 @@ export default defineConfig({
30
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
31
trace: 'on-first-retry',
32
timezoneId: 'Europe/Rome',
33
- launchOptions: {
34
- args: [
35
- '--disable-font-subpixel-positioning',
36
- ]
37
- },
33
},
34
35
/* Configure projects for major browsers */
@@ -56,8 +51,14 @@ export default defineConfig({
51
},
52
{
53
name: 'firefox',
59
- use: { ...devices['Desktop Firefox'] },
60
- }
54
+ use: {
55
+ ...devices['Desktop Firefox'],
56
+ launchOptions: {
57
+ // Firefox can purge localhost-like state during bounce-tracker heuristics in tests.
58
+ firefoxUserPrefs: { 'privacy.bounceTrackingProtection.mode': 0 },
59
+ },
60
+ },
61
+ },
62
/*
63
{
64
name: 'firefox',