test(office): replace fixture tests with live OnlyOffice API integration

Remove synthetic map-based entity and fetch mapper unit tests; cover all
menu subjects and preview pipelines via integration tests against the real
Workspace API. Handle draft mail without subjects in list mapping.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-24 16:37:46 +01:00
co-authored by Cursor
parent 5e856ed22b
commit e969624297
7 changed files with 307 additions and 137 deletions
+3 -2
View File
@@ -40,8 +40,9 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Install: `go install github.com/eslider/go-onlyoffice/cmd/office@latest`.
- **`cmd/internal/bootstrap`** — shared env loading and client auth for `oo`
and `office`.
- Unit tests for preview formatters, menu/selection model, fetch mappers, and
key routing; integration tests under `cmd/office/fetch/` (`-tags=integration`).
- Integration tests under `cmd/office/fetch/` and `cmd/office/preview/`
(`-tags=integration`) hit the live OnlyOffice API — no fixture maps or
httptest vendor mocks. Unit tests remain for pure UI/formatting helpers only.
### Added — library