From b10e14899dc57b24eacf121305f922d719ed2d5f Mon Sep 17 00:00:00 2001 From: kl <632104866@QQ.com> Date: Wed, 4 Mar 2026 17:39:41 +0800 Subject: [PATCH] test(e2e): unify E2E CI command and align preview URL encoding (#719) * test(e2e): follow-up fixes for post-merge copilot review feedback * test(e2e): guard E2E_MAX_PREVIEW_MS against sub-second values * 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}`); }