mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-28 23:28:16 +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", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue