diff --git a/test/integration/stamp_editor_spec.mjs b/test/integration/stamp_editor_spec.mjs index 1b4aecd1d722f5..b0a0d5045874a9 100644 --- a/test/integration/stamp_editor_spec.mjs +++ b/test/integration/stamp_editor_spec.mjs @@ -987,6 +987,12 @@ describe("Stamp Editor", () => { const buttonSelector = `${editorSelector} button.altText.new`; await page.waitForSelector(buttonSelector, { visible: true }); + // Wait for translation to run. + await page.evaluate(async () => { + await new Promise(resolve => { + window.requestAnimationFrame(resolve); + }); + }); // Check the text in the button. let text = await page.evaluate( sel => document.querySelector(sel).textContent, @@ -1036,6 +1042,12 @@ describe("Stamp Editor", () => { await waitForSelectedEditor(page, editorSelector); await page.waitForSelector(buttonSelector, { visible: true }); + // Wait for translation to run. + await page.evaluate(async () => { + await new Promise(resolve => { + window.requestAnimationFrame(resolve); + }); + }); // Check the text in the button. text = await page.evaluate( sel => document.querySelector(sel).textContent, @@ -1078,6 +1090,12 @@ describe("Stamp Editor", () => { await page.click("#newAltTextSave"); await page.waitForSelector("#newAltTextDialog", { visible: false }); + // Wait for translation to run. + await page.evaluate(async () => { + await new Promise(resolve => { + window.requestAnimationFrame(resolve); + }); + }); // Check the text in the button. text = await page.evaluate( sel => document.querySelector(sel).firstChild.textContent,