From bb891bcba09edabe29db996a21cf6ceb57c8641e Mon Sep 17 00:00:00 2001 From: InstaZDLL Date: Mon, 26 Oct 2026 23:32:47 +0100 Subject: [PATCH 1/4] refactor(webapp): move studio-nocturne.spec.ts to e2e/fixtures/api.ts The file is split in the next commit; moving it first keeps its history on the mock server it leaves behind. Signed-off-by: InstaZDLL --- webapp/e2e/{studio-nocturne.spec.ts => fixtures/api.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename webapp/e2e/{studio-nocturne.spec.ts => fixtures/api.ts} (100%) diff --git a/webapp/e2e/studio-nocturne.spec.ts b/webapp/e2e/fixtures/api.ts similarity index 100% rename from webapp/e2e/studio-nocturne.spec.ts rename to webapp/e2e/fixtures/api.ts From e8b34c980fe910f468deb1ce020e1099504c318f Mon Sep 17 00:00:00 2001 From: InstaZDLL Date: Mon, 26 Oct 2026 23:35:23 +0100 Subject: [PATCH 2/4] refactor(webapp): split the studio-nocturne e2e spec into fixtures and one spec per subject The 9,611-line spec becomes 21 specs, one per subject, over eleven fixture files under e2e/fixtures/. Every test keeps its title, body, comments and for-loop generation; the listing holds the same 508 tests. The mutable mock state was 51 module-level lets, which the tests reassign: an imported binding cannot be, so they are now fields of one exported `mock` object and every reference reads `mock.x`. The top-level beforeEach that reset them and installed the mock is exported as `resetAndMockApi`, and each spec installs it with `test.beforeEach`. Signed-off-by: InstaZDLL --- webapp/e2e/admin.spec.ts | 230 + webapp/e2e/artist.spec.ts | 575 ++ webapp/e2e/attention.spec.ts | 221 + webapp/e2e/canvas.spec.ts | 204 + webapp/e2e/editorial-pages.spec.ts | 2 +- webapp/e2e/fixtures/accessibility.ts | 113 + webapp/e2e/fixtures/api.ts | 9161 +---------------------- webapp/e2e/fixtures/artist-images.ts | 78 + webapp/e2e/fixtures/attention.ts | 121 + webapp/e2e/fixtures/catalogue.ts | 468 ++ webapp/e2e/fixtures/folders.ts | 107 + webapp/e2e/fixtures/media.ts | 39 + webapp/e2e/fixtures/offline.ts | 51 + webapp/e2e/fixtures/quality.ts | 153 + webapp/e2e/fixtures/radio.ts | 127 + webapp/e2e/fixtures/state.ts | 220 + webapp/e2e/folders.spec.ts | 354 + webapp/e2e/library-cache.spec.ts | 476 ++ webapp/e2e/library.spec.ts | 552 ++ webapp/e2e/lyrics.spec.ts | 495 ++ webapp/e2e/maintenance.spec.ts | 298 + webapp/e2e/mixes-and-statistics.spec.ts | 170 + webapp/e2e/offline.spec.ts | 186 + webapp/e2e/player.spec.ts | 719 ++ webapp/e2e/playlists.spec.ts | 304 + webapp/e2e/quality.spec.ts | 221 + webapp/e2e/radio.spec.ts | 483 ++ webapp/e2e/scrobbling.spec.ts | 255 + webapp/e2e/settings.spec.ts | 458 ++ webapp/e2e/shares.spec.ts | 205 + webapp/e2e/shell.spec.ts | 653 ++ webapp/e2e/track.spec.ts | 460 ++ webapp/e2e/uploads.spec.ts | 142 + webapp/e2e/workspace-pages.spec.ts | 2 +- 34 files changed, 9326 insertions(+), 8977 deletions(-) create mode 100644 webapp/e2e/admin.spec.ts create mode 100644 webapp/e2e/artist.spec.ts create mode 100644 webapp/e2e/attention.spec.ts create mode 100644 webapp/e2e/canvas.spec.ts create mode 100644 webapp/e2e/fixtures/accessibility.ts create mode 100644 webapp/e2e/fixtures/artist-images.ts create mode 100644 webapp/e2e/fixtures/attention.ts create mode 100644 webapp/e2e/fixtures/catalogue.ts create mode 100644 webapp/e2e/fixtures/folders.ts create mode 100644 webapp/e2e/fixtures/media.ts create mode 100644 webapp/e2e/fixtures/offline.ts create mode 100644 webapp/e2e/fixtures/quality.ts create mode 100644 webapp/e2e/fixtures/radio.ts create mode 100644 webapp/e2e/fixtures/state.ts create mode 100644 webapp/e2e/folders.spec.ts create mode 100644 webapp/e2e/library-cache.spec.ts create mode 100644 webapp/e2e/library.spec.ts create mode 100644 webapp/e2e/lyrics.spec.ts create mode 100644 webapp/e2e/maintenance.spec.ts create mode 100644 webapp/e2e/mixes-and-statistics.spec.ts create mode 100644 webapp/e2e/offline.spec.ts create mode 100644 webapp/e2e/player.spec.ts create mode 100644 webapp/e2e/playlists.spec.ts create mode 100644 webapp/e2e/quality.spec.ts create mode 100644 webapp/e2e/radio.spec.ts create mode 100644 webapp/e2e/scrobbling.spec.ts create mode 100644 webapp/e2e/settings.spec.ts create mode 100644 webapp/e2e/shares.spec.ts create mode 100644 webapp/e2e/shell.spec.ts create mode 100644 webapp/e2e/track.spec.ts create mode 100644 webapp/e2e/uploads.spec.ts diff --git a/webapp/e2e/admin.spec.ts b/webapp/e2e/admin.spec.ts new file mode 100644 index 00000000..f919475d --- /dev/null +++ b/webapp/e2e/admin.spec.ts @@ -0,0 +1,230 @@ +// The administration page: scans, tokens, members and a library's watch. + +import { expect, test } from "@playwright/test"; + +import { resetAndMockApi } from "./fixtures/api"; +import { library } from "./fixtures/catalogue"; +import { mock } from "./fixtures/state"; + +test.beforeEach(resetAndMockApi); + +/** + * Live scan progress. The stream is read with `fetch` and not `EventSource`, + * because the route authenticates on a bearer token and `EventSource` sends no + * headers — the same wall `