From 3d0b14515fb42e6383e686c6148e9cdc83da44a6 Mon Sep 17 00:00:00 2001 From: kl Date: Wed, 4 Mar 2026 17:24:27 +0800 Subject: [PATCH] test(e2e): align preview URL encoding and docs --- tests/e2e/README.md | 1 + tests/e2e/specs/preview-smoke.spec.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/e2e/README.md b/tests/e2e/README.md index 32ad1396..c5336162 100644 --- a/tests/e2e/README.md +++ b/tests/e2e/README.md @@ -12,6 +12,7 @@ This folder contains a first MVP of end-to-end automated tests. - `/onlinePreview` - `/getCorsFile` - Basic performance smoke checks (configurable threshold): txt/docx/xlsx preview response time +- CI combined run command available via `npm run test:ci` ## Local run diff --git a/tests/e2e/specs/preview-smoke.spec.ts b/tests/e2e/specs/preview-smoke.spec.ts index 8f2b36c5..afa769b4 100644 --- a/tests/e2e/specs/preview-smoke.spec.ts +++ b/tests/e2e/specs/preview-smoke.spec.ts @@ -7,7 +7,7 @@ function b64(v: string): string { } async function openPreview(request: any, fileUrl: string) { - const encoded = b64(fileUrl); + const encoded = encodeURIComponent(b64(fileUrl)); return request.get(`/onlinePreview?url=${encoded}`); }