mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-03-18 23:23:46 +08:00
test(e2e): align preview URL encoding and docs
This commit is contained in:
@@ -12,6 +12,7 @@ This folder contains a first MVP of end-to-end automated tests.
|
|||||||
- `/onlinePreview`
|
- `/onlinePreview`
|
||||||
- `/getCorsFile`
|
- `/getCorsFile`
|
||||||
- Basic performance smoke checks (configurable threshold): txt/docx/xlsx preview response time
|
- Basic performance smoke checks (configurable threshold): txt/docx/xlsx preview response time
|
||||||
|
- CI combined run command available via `npm run test:ci`
|
||||||
|
|
||||||
## Local run
|
## Local run
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function b64(v: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function openPreview(request: any, fileUrl: string) {
|
async function openPreview(request: any, fileUrl: string) {
|
||||||
const encoded = b64(fileUrl);
|
const encoded = encodeURIComponent(b64(fileUrl));
|
||||||
return request.get(`/onlinePreview?url=${encoded}`);
|
return request.get(`/onlinePreview?url=${encoded}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user