test(e2e): add mock sidebar logout coverage

This commit is contained in:
2026-06-29 18:16:40 +08:00
parent e951d56076
commit 9ad17379e8
2 changed files with 48 additions and 0 deletions
+4
View File
@@ -21,6 +21,10 @@ export async function mockCoreApis(page: Page): Promise<void> {
await route.fulfill({ json: apiEnvelope(emailLoginResponse) });
});
await page.route("**/api/auth/logout", async (route) => {
await route.fulfill({ json: apiEnvelope(null) });
});
await page.route("**/api/user/profile", async (route) => {
await route.fulfill({ json: apiEnvelope(e2eEmailUser) });
});