mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
add profile page e2e tests
This commit is contained in:
committed by
Constantin Graf
parent
372c7b02a0
commit
ceec4cbf62
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user