1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #16567 from calixteman/issue16566

[Editor] Show hidden annotations once editing is finished
This commit is contained in:
calixteman 2023-06-19 23:50:40 +02:00 committed by GitHub
commit d01efc6767
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 55 additions and 0 deletions

View file

@ -471,4 +471,41 @@ describe("ResetForm action", () => {
});
});
});
describe("Ink widget and its popup after editing", () => {
describe("annotation-caret-ink.pdf", () => {
let pages;
beforeAll(async () => {
pages = await loadAndWait(
"annotation-caret-ink.pdf",
"[data-annotation-id='25R']"
);
});
afterAll(async () => {
await closePages(pages);
});
it("must check that the annotation has a popup", async () => {
await Promise.all(
pages.map(async ([browserName, page]) => {
await page.waitForFunction(
`document.querySelector("[data-annotation-id='25R']").hidden === false`
);
await page.click("#editorFreeText");
await page.waitForTimeout(10);
await page.waitForFunction(
`document.querySelector("[data-annotation-id='25R']").hidden === true`
);
await page.click("#editorFreeText");
await page.waitForTimeout(10);
await page.waitForFunction(
`document.querySelector("[data-annotation-id='25R']").hidden === false`
);
})
);
});
});
});
});