mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
[Annotation] Replace use of id by data-element-id to have the correct id
This commit is contained in:
parent
ba3a0e104a
commit
6db9cefaaf
4 changed files with 28 additions and 1 deletions
|
@ -95,6 +95,31 @@ describe("Checkbox annotation", () => {
|
|||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("issue15597.pdf", () => {
|
||||
let pages;
|
||||
|
||||
beforeAll(async () => {
|
||||
pages = await loadAndWait("issue15597.pdf", "[data-annotation-id='7R']");
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await closePages(pages);
|
||||
});
|
||||
|
||||
it("must check the checkbox", async () => {
|
||||
await Promise.all(
|
||||
pages.map(async ([browserName, page]) => {
|
||||
const selector = "[data-annotation-id='7R']";
|
||||
await page.click(selector);
|
||||
await page.waitForFunction(
|
||||
`document.querySelector("${selector} > :first-child").checked`
|
||||
);
|
||||
expect(true).withContext(`In ${browserName}`).toEqual(true);
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("Text widget", () => {
|
||||
|
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -547,3 +547,4 @@
|
|||
!bug1782564.pdf
|
||||
!issue15340.pdf
|
||||
!bug1795263.pdf
|
||||
!issue15597.pdf
|
||||
|
|
BIN
test/pdfs/issue15597.pdf
Executable file
BIN
test/pdfs/issue15597.pdf
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue