fix: TOC PDF - forcer le rechargement de l'iframe (BUG-063 complement)
CI / lint (push) Successful in 1m37s
CI / security (push) Successful in 1m15s
CI / test (push) Successful in 3m36s
CI / build (push) Successful in 59s
CI / e2e (push) Successful in 11m13s

This commit is contained in:
2026-09-17 21:16:46 -04:00
parent f7e068baed
commit 7f0f64a42e
13 changed files with 46 additions and 22 deletions
+3 -1
View File
@@ -101,9 +101,11 @@ test.describe('PDF viewer — TOC & plein largeur', () => {
await expect(tocLinks).toHaveCount(3, { timeout: 10000 });
await page.locator('#content-area .pdf-toc a[data-page="3"]').click();
// Le changement de query force un rechargement (un simple changement de
// fragment est ignoré par le lecteur PDF natif), puis #page=3 est appliqué.
await expect(page.locator('#content-area .pdf-iframe')).toHaveAttribute(
'src',
/\/pdf\/stream\?path=.*#page=3$/,
/\/pdf\/stream\?path=.*&_pdfpage=\d+#page=3$/,
{ timeout: 5000 },
);
});