test(e2e): phase-2 add Office and zip smoke automation (#714)

* test(e2e): phase-2 add office and zip smoke coverage

* test(e2e): address copilot review for fixture stability and CI python setup

* test(e2e): fix preflight fixture scope and path handling

* test(e2e): harden fixture preflight and remove duplicate generation

* test(e2e): remove redundant zip install and cleanup temp zip dir

* test(e2e): ensure zip dependency and unify python command in docs

* docs(e2e): align README with npm gen scripts and python3 usage
This commit is contained in:
kl
2026-03-04 14:34:32 +08:00
committed by GitHub
parent a0d78c57e3
commit bb457924cd
9 changed files with 136 additions and 12 deletions

View File

@@ -5,6 +5,8 @@ This folder contains a first MVP of end-to-end automated tests.
## What is covered
- Basic preview smoke checks for common file types (txt/md/json/xml/csv/html/png)
- Office Phase-2 smoke checks (docx/xlsx/pptx)
- Archive smoke check (zip)
- Basic endpoint reachability
- Security regression checks for blocked internal-network hosts (`10.*`) on:
- `/onlinePreview`
@@ -24,13 +26,16 @@ mvn -q -pl server -DskipTests package
cd tests/e2e
npm install
npx playwright install --with-deps chromium
pip3 install -r requirements.txt
```
> Prerequisite: ensure `zip` command is available in PATH (used for `sample.zip` fixture generation).
3. Generate fixtures and start fixture server:
```bash
cd /path/to/kkFileView
node tests/e2e/scripts/generate-fixtures.mjs
npm run gen:all
cd tests/e2e/fixtures && python3 -m http.server 18080
```