From 3f71bbbee94571a771331d2af4a688cc42dca548 Mon Sep 17 00:00:00 2001 From: Allan Lasser Date: Thu, 12 Dec 2024 17:22:52 -0500 Subject: [PATCH 1/2] Simulate 403 error in Viewer storybook --- .../viewer/stories/Viewer.stories.svelte | 17 +++++++++++++++++ src/test/handlers/viewer.ts | 6 ++++++ 2 files changed, 23 insertions(+) create mode 100644 src/test/handlers/viewer.ts diff --git a/src/lib/components/viewer/stories/Viewer.stories.svelte b/src/lib/components/viewer/stories/Viewer.stories.svelte index a3b7d2451..80e67022c 100644 --- a/src/lib/components/viewer/stories/Viewer.stories.svelte +++ b/src/lib/components/viewer/stories/Viewer.stories.svelte @@ -8,6 +8,8 @@ import doc from "@/test/fixtures/documents/document-expanded.json"; import txt from "@/test/fixtures/documents/document.txt.json"; import { searchWithin } from "@/test/handlers/documents"; + import { simulatePDF403Error } from "@/test/handlers/viewer"; + import { pdfUrl } from "@/lib/api/documents"; const document = doc as Document; @@ -102,6 +104,21 @@ }} /> + +