From 41cd41590af84e8fdfe1f4a39c8d2f2ef2c5096d Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 1 Aug 2026 20:02:04 +0200 Subject: [PATCH] test(e2e): scope the last global Stalker reset in sources-pwa helpers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Completes 3a93fef0f: that commit scoped self-hosted.e2e.ts but missed resetPwaMockServers, which still wiped the whole Stalker fixture from a third spec file. Scope it to the two MACs this suite owns. The auth tests use dedicated MACs no sibling touches, so portal sessions — the fragile state — can no longer be cleared by a parallel worker. Content MACs still overlap between files, which is harmless: that data is regenerated deterministically from the same seed. Verified with the full interfering set running together: stalker.e2e.ts + self-hosted.e2e.ts + sources-pwa.e2e.ts, 26/26 green. Co-Authored-By: Claude Fable 5 --- apps/web-e2e/src/sources-pwa.helpers.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/web-e2e/src/sources-pwa.helpers.ts b/apps/web-e2e/src/sources-pwa.helpers.ts index 5e8f2d722..4f3e1825d 100644 --- a/apps/web-e2e/src/sources-pwa.helpers.ts +++ b/apps/web-e2e/src/sources-pwa.helpers.ts @@ -31,11 +31,25 @@ type SourceDialogField = | 'title' | 'username'; +/** + * Reset the fixtures this suite uses. The Stalker reset is scoped to the MACs + * touched here: that mock is shared with stalker.e2e.ts, which runs in a + * parallel Playwright worker, and a global reset would destroy its portal + * sessions mid-test. + */ export async function resetPwaMockServers( request: APIRequestContext ): Promise { await request.post(`${XTREAM_MOCK_SERVER}/reset`); - await request.post(`${STALKER_MOCK_SERVER}/reset`); + await Promise.all( + [DEFAULT_MAC, EDITED_MAC].map((mac) => + request.post( + `${STALKER_MOCK_SERVER}/reset?macAddress=${encodeURIComponent( + mac + )}` + ) + ) + ); } export async function interceptPwaProviderRequests(