From c23d134e950c4a7928ba0f8a50ce0f986864e4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemek=20Wi=C4=99ch?= Date: Wed, 1 Jul 2026 13:08:11 +0200 Subject: [PATCH] Fix failing visual test --- tests/intro_visual.spec.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/intro_visual.spec.ts b/tests/intro_visual.spec.ts index 30bfa90..9a5e6e4 100644 --- a/tests/intro_visual.spec.ts +++ b/tests/intro_visual.spec.ts @@ -8,6 +8,17 @@ test.describe('Intro page visual validation @visual', () => { }); test('intro-page', async ({page}) => { + // Wait for the async changelog content to load so React doesn't + // overwrite our placeholder after we inject it. + await page.waitForFunction(() => { + const headers = Array.from(document.querySelectorAll('h3')); + const whatsNew = headers.find((h) => + h.textContent?.includes("What's new"), + ); + const span = whatsNew?.nextElementSibling; + return span && span.innerHTML.trim() !== ''; + }); + // Clean dynamic elements right before snapping the screenshot. await page.evaluate(() => { // 1. Overwrite dynamic footer versioning.