test(e2e): scope the last global Stalker reset in sources-pwa helpers

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 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5 committed 2026-08-01 20:02:04 +02:00
1 parent 3a93fef0f3
commit 41cd41590a
1 file changed
+15 -1
+15 -1
View File
@@ -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<void> {
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(