docs(e2e): record real media-source validation results #346
@@ -7,9 +7,11 @@ completion is tracked by follow-up issue [#333](https://gitea.tblindustries.be/t
|
||||
The original live local E2E run (branch `feat/202-media-sources`, worktree
|
||||
`/Users/timothy/etv-worktrees/202-int`) automated everything that a disposable local instance could
|
||||
exercise (local library CRUD, scan, move-path, delete, dirty-guard, apiKey contract, remote-screen
|
||||
render). The two flows below genuinely need a live Jellyfin/Emby server and a live Plex account and
|
||||
have **not** been recorded as run. Exercise them against the homelab instances; do not mark #333 done
|
||||
without actual results.
|
||||
render). The two flows below genuinely need a live Jellyfin/Emby server and a live Plex account.
|
||||
Results from the first homelab run on 2026-07-13 are recorded under each flow. Jellyfin validation is
|
||||
complete. Plex account authorization and cleanup were exercised, but the test account returned no
|
||||
eligible Plex servers, so server/library discovery and sync-preference persistence remain outstanding.
|
||||
Do not mark #333 done until those remaining Plex steps are exercised against an account with a server.
|
||||
|
||||
## 1. Jellyfin/Emby real-server connect
|
||||
|
||||
@@ -27,6 +29,28 @@ without actual results.
|
||||
7. Re-enter a **wrong** API key and confirm the UI surfaces a clear connection-failure state rather than
|
||||
a silent success or an unhandled 500.
|
||||
|
||||
### Result — 2026-07-13: passed
|
||||
|
||||
- [x] Connected to the homelab Jellyfin server and confirmed the connected state and server address.
|
||||
- [x] Confirmed the secure-key contract: `hasApiKey` help was visible, the replacement input was empty
|
||||
and `type="password"`, and the raw API key was absent from the DOM and responses.
|
||||
- [x] Toggled the Movies library off and back on. Both
|
||||
`PUT /api/v1/media-sources/jellyfin/2/libraries` requests returned 200, and both states persisted
|
||||
across reload. The original enabled state was restored.
|
||||
- [x] Added `/etv-e2e-333/remote` → `/etv-e2e-333/local`; the path replacement persisted across
|
||||
reload, then was removed and confirmed absent after another reload.
|
||||
- [x] Launched Movies from the `/app/libraries` hub. `POST /api/v1/libraries/15/scan` returned 202, the
|
||||
SPA showed **Scanning**, and **Last scan** advanced from 20:28 to 20:29. The rendered item count
|
||||
remained 254 because the server contents did not change during the scan.
|
||||
- [x] Submitted a deliberately wrong key. The connection request returned 422 Problem Details with
|
||||
`Response status code does not indicate success: 401 (Unauthorized).`; the SPA showed that message
|
||||
and stayed on the editor. The original key was then restored with a 200 response and the source
|
||||
returned to its connected state.
|
||||
|
||||
The successful connection save also exposed a stale dirty-guard prompt during navigation. That
|
||||
failure is captured separately in [#344](https://gitea.tblindustries.be/timothy/ersatztv/issues/344).
|
||||
No unexpected page errors occurred; the only console error was the deliberately induced 422 request.
|
||||
|
||||
## 2. Plex interactive pin-flow auth
|
||||
|
||||
1. Go to `/app/libraries/plex`.
|
||||
@@ -42,11 +66,35 @@ without actual results.
|
||||
7. Sign out / de-authorize and confirm the SPA correctly returns to the "Not signed in" state without
|
||||
leaving stale server/library data visible.
|
||||
|
||||
### Result — 2026-07-13: partial; Plex server prerequisite remains
|
||||
|
||||
- [x] Started a real plex.tv pin flow. The SPA opened the HTTPS authorization URL in a new tab and
|
||||
displayed the waiting state while polling `GET /api/v1/media-sources/plex`.
|
||||
- [x] Completed authorization. Without a manual refresh, the SPA transitioned from **Waiting for you
|
||||
to authorize** at 20:35:13 UTC to a terminal state at 20:35:55 UTC. The API then reported
|
||||
`isAuthorized: true` and `isLocked: false`.
|
||||
- [ ] Server discovery returned `servers: []`. The bounded server log recorded successful Plex
|
||||
authentication and no discovery exception, but this test account/deployment exposed no eligible
|
||||
Plex server. Repeat with an owned, reachable Plex Media Server attached to the test account.
|
||||
- [ ] With no discovered server, the library list, sync-preference toggle, and persistence checks could
|
||||
not be exercised.
|
||||
- [x] Removed the temporary authorization through
|
||||
`POST /api/v1/media-sources/plex/sign-out` (204). The API returned to `isAuthorized: false`,
|
||||
`isLocked: false`, `servers: []`, and the SPA showed **Not signed in** with no stale server rows.
|
||||
|
||||
The authorized/unlocked/zero-server state exposed a separate SPA defect: the pin status said
|
||||
**Connected to Plex**, the Connection card said **Not signed in**, and the UI offered another sign-in
|
||||
but no sign-out action. Cleanup therefore required the API. The exact request/state evidence and
|
||||
root-cause analysis are captured in
|
||||
[#345](https://gitea.tblindustries.be/timothy/ersatztv/issues/345).
|
||||
|
||||
## Notes for whoever runs this
|
||||
|
||||
- Use a throwaway/test Jellyfin or Emby API key if possible — the SPA's `hasApiKey` contract means the
|
||||
UI never displays the key back, so you won't be able to visually re-confirm which key is active
|
||||
beyond "a key is set."
|
||||
- The Plex pin-flow is time-limited (plex.tv auth PINs expire) — don't leave the tab idle mid-flow.
|
||||
- A Plex account authorization alone is insufficient for the remaining validation. The account must
|
||||
expose at least one owned, reachable Plex Media Server so its libraries can be discovered and edited.
|
||||
- If either flow 500s or the SPA console shows errors, capture the exact request/response (Network
|
||||
tab) and file a separate bug linked from #333.
|
||||
|
||||
Reference in New Issue
Block a user