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(