mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Merge pull request #18320 from timvandermeij/integration-test-tabs
Fix the "copy/paste from a tab to an other" stamp editor integration test
This commit is contained in:
commit
6784124a74
1 changed files with 7 additions and 4 deletions
|
@ -559,27 +559,30 @@ describe("Stamp Editor", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
await closePages(pages1);
|
// Close the pages in reverse order because the second document will have
|
||||||
|
// focus at the end of the test and the `testingClose` method requires
|
||||||
|
// (via `requestAnimationFrame` usage in the `this.l10n.destroy()` call)
|
||||||
|
// that the page it's called on has focus.
|
||||||
await closePages(pages2);
|
await closePages(pages2);
|
||||||
|
await closePages(pages1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("must check that the alt-text button is here when pasting in the second tab", async () => {
|
it("must check that the alt-text button is here when pasting in the second tab", async () => {
|
||||||
for (let i = 0; i < pages1.length; i++) {
|
for (let i = 0; i < pages1.length; i++) {
|
||||||
const [, page1] = pages1[i];
|
const [, page1] = pages1[i];
|
||||||
page1.bringToFront();
|
await page1.bringToFront();
|
||||||
await page1.click("#editorStamp");
|
await page1.click("#editorStamp");
|
||||||
|
|
||||||
await copyImage(page1, "../images/firefox_logo.png", 0);
|
await copyImage(page1, "../images/firefox_logo.png", 0);
|
||||||
await kbCopy(page1);
|
await kbCopy(page1);
|
||||||
|
|
||||||
const [, page2] = pages2[i];
|
const [, page2] = pages2[i];
|
||||||
page2.bringToFront();
|
await page2.bringToFront();
|
||||||
await page2.click("#editorStamp");
|
await page2.click("#editorStamp");
|
||||||
|
|
||||||
await kbPaste(page2);
|
await kbPaste(page2);
|
||||||
|
|
||||||
await waitForImage(page2, getEditorSelector(0));
|
await waitForImage(page2, getEditorSelector(0));
|
||||||
await page2.waitForSelector(`${getEditorSelector(0)} .altText`);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue