From 489139260b0505e34da815a5540d284581e3a9e5 Mon Sep 17 00:00:00 2001 From: Mihawk <163614687+mihawk-99@users.noreply.github.com> Date: Sat, 10 Oct 2026 14:27:18 -0400 Subject: [PATCH] tests: the language test waits for the Settings page instead of reading it early MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After the click on Settings it waited for the Settings heading, which is static and translated while still hidden, then read the page title before navigation had run (seen once in a full run: "Vue d'ensemble" for "Réglages"). It now waits for the title. Evidence: three consecutive passes of tests.test_webui_language.LanguageBrowser. Gates: bash tools/verify.sh -> verify: PASS (format unit build integration evidence) --- tests/webui_language_browser.cjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/webui_language_browser.cjs b/tests/webui_language_browser.cjs index b707216..3180a61 100644 --- a/tests/webui_language_browser.cjs +++ b/tests/webui_language_browser.cjs @@ -60,7 +60,8 @@ function untranslated(page, catalog) { // Text the scripts write later is translated too. await page.locator('[data-page=settings]').click(); await page.waitForFunction(() => document.querySelector('#settings-heading').textContent === 'Réglages globaux de RetroArch'); - assert.equal(await page.locator('#page-title').innerText(), 'Réglages'); + // The heading is static (translated while hidden): the page has changed once its title has. + await page.waitForFunction(() => document.querySelector('#page-title').textContent === 'Réglages'); // A count the script writes ("{0} settings"). await page.waitForFunction(() => /^\d+ réglages$/.test(document.querySelector('#settings-count').textContent)); assert.deepEqual(await untranslated(page, french), [], 'the settings page is all French');