mirror of
https://github.com/mihawk-99/PS5_RetroArch.git
synced 2026-10-18 23:09:29 -05:00
tests: the language test waits for the Settings page instead of reading it early
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)
This commit is contained in:
1 parent
fc1df57bfe
commit
489139260b
1 file changed
+2
-1
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user