Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Snuffleupagus committed Oct 28, 2024
1 parent 25e0cd2 commit dbeda77
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/integration/stamp_editor_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit dbeda77

Please sign in to comment.