Merge pull request #21373 from Snuffleupagus/presentation-mode-test-links

Add an integration-test for clicking on internal links in presentation mode
This commit is contained in:
Jonas Jenwald 2026-06-02 10:56:14 +02:00 committed by GitHub
commit b43ef1c746
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -170,5 +170,27 @@ describe("PDFPresentationMode", () => {
})
);
});
it("check that clicking on internal links work in presentation mode", async () => {
await Promise.all(
pages.map(async ([browserName, page]) => {
await enterPresentationMode(page);
// Go to the last page.
await page.click("#pdfjs_internal_id_12R");
await page.waitForFunction(
`window.PDFViewerApplication.pdfViewer.currentPageNumber === 3`
);
// Go to the first page.
await page.keyboard.press("Home");
await page.waitForFunction(
`window.PDFViewerApplication.pdfViewer.currentPageNumber === 1`
);
await exitPresentationMode(page, browserName);
})
);
});
});
});