dx: steadier tests
Massimo Melina committed
Aug 8, 2025 at 12:58 UTC
482727c0af652648e0a7c9a83f7e1a04248bb2b7
3 files changed
+8
-1
e2e/frontend.spec.ts
+2
-1
@@ -173,7 +173,8 @@ test('search1', async ({ page }) => {
173
});
174
175
test('frontend-admin', async ({ page }) => {
176
- await page.goto(URL);
176
+ await page.goto(URL, { waitUntil: 'networkidle' });
177
+ await page.evaluate(() => document.fonts.ready); // aspetta i font
178
await page.getByRole('button', { name: 'Options' }).click();
179
// no admin button yet,
180
await expect(page.getByRole('dialog')).toMatchAriaSnapshot(`
e2e/screenshot.css
+1
@@ -1,6 +1,7 @@
1
/* avoid meaningless graphical effects that may cause changes in the screenshots */
2
*:focus { outline: none !important; box-shadow: none !important; }
3
main *:hover { background: none !important; }
4
+* { animation: none !important; transition: none !important; }
5
6
.hideInTests, /* use for elements with variable size, where masking would produce changes anyway */
7
.list-wrapper:not([uri="/"]) .entry-ts { display: none } /* ignore changing timestamps inside folders */
playwright.config.ts
+5
@@ -25,6 +25,11 @@ export default defineConfig({
25
26
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
27
trace: 'on-first-retry',
28
+ launchOptions: {
29
+ args: [
30
+ '--disable-font-subpixel-positioning',
31
+ ]
32
+ },
33
},
34
35
/* Configure projects for major browsers */