add profile page e2e tests

This commit is contained in:
Gregor Vostrak
2026-05-26 17:11:28 +02:00
committed by Constantin Graf
parent 372c7b02a0
commit ceec4cbf62
4 changed files with 246 additions and 11 deletions

View File

@@ -788,6 +788,19 @@ export async function createTimeEntryWithTimestampsViaApi(
// User profile helpers
// ──────────────────────────────────────────────────
export async function getCurrentUserViaApi(ctx: TestContext) {
const response = await ctx.request.get(`${PLAYWRIGHT_BASE_URL}/api/v1/users/me`);
expect(response.status()).toBe(200);
const body = await response.json();
return body.data as {
id: string;
name: string;
email: string;
timezone: string;
week_start: string;
};
}
export async function updateUserProfileViaWeb(
page: Page,
settings: { timezone?: string; week_start?: string }