mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
[Annotation] Strip out the array index in the path only when the path is from a terminal node (bug 1847733)
This commit is contained in:
parent
19c712c2d0
commit
e2f20a1afe
5 changed files with 44 additions and 2 deletions
|
@ -160,6 +160,37 @@ describe("Checkbox annotation", () => {
|
|||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("bug1847733.pdf", () => {
|
||||
let pages;
|
||||
|
||||
beforeAll(async () => {
|
||||
pages = await loadAndWait("bug1847733.pdf", "[data-annotation-id='18R']");
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await closePages(pages);
|
||||
});
|
||||
|
||||
it("must check the checkbox", async () => {
|
||||
await Promise.all(
|
||||
pages.map(async ([browserName, page]) => {
|
||||
const selectors = [18, 30, 42, 54].map(
|
||||
id => `[data-annotation-id='${id}R']`
|
||||
);
|
||||
for (const selector of selectors) {
|
||||
await page.click(selector);
|
||||
page.waitForTimeout(10);
|
||||
}
|
||||
for (const selector of selectors) {
|
||||
await page.waitForFunction(
|
||||
`document.querySelector("${selector} > :first-child").checked`
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("Text widget", () => {
|
||||
|
|
2
test/pdfs/bug1847733.pdf.link
Normal file
2
test/pdfs/bug1847733.pdf.link
Normal file
|
@ -0,0 +1,2 @@
|
|||
https://github.com/mozilla/pdf.js/files/12290354/PDF.Form.4.pdf
|
||||
|
|
@ -8070,5 +8070,13 @@
|
|||
"rounds": 1,
|
||||
"type": "eq",
|
||||
"print": true
|
||||
},
|
||||
{
|
||||
"id": "bug1847733",
|
||||
"file": "pdfs/bug1847733.pdf",
|
||||
"md5": "d2e167216493a50f732b4b3685a91792",
|
||||
"rounds": 1,
|
||||
"link": true,
|
||||
"type": "other"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue