From 4e6b7be4d769a9665f5b0c974e31ba8d10b0dcd1 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 1 Jun 2026 14:19:49 +0200 Subject: [PATCH] Add an integration-test for clicking on internal links in presentation mode --- test/integration/presentation_mode_spec.mjs | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/integration/presentation_mode_spec.mjs b/test/integration/presentation_mode_spec.mjs index 15edbb3ec..570ceeeac 100644 --- a/test/integration/presentation_mode_spec.mjs +++ b/test/integration/presentation_mode_spec.mjs @@ -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); + }) + ); + }); }); });