mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 19:52:15 +01:00
update e2e test setup to use user settings api endpoint
This commit is contained in:
committed by
Constantin Graf
parent
5d01b20dbf
commit
a4c400ef4e
@@ -12,7 +12,7 @@ import {
|
||||
createRunningTimeEntryWithStartViaApi,
|
||||
createTaskViaApi,
|
||||
createProjectWithClientViaApi,
|
||||
updateUserProfileViaWeb,
|
||||
updateUserProfileViaApi,
|
||||
updateOrganizationSettingViaApi,
|
||||
} from './utils/api';
|
||||
|
||||
@@ -1803,28 +1803,22 @@ test.describe('Click-Drag Selection to Create', () => {
|
||||
// =============================================
|
||||
|
||||
test.describe('Timezone & Localization', () => {
|
||||
test('week start day: monday shows Mon as first column', async ({ page }) => {
|
||||
// Navigate to calendar first to load Inertia page props
|
||||
test('week start day: monday shows Mon as first column', async ({ page, ctx }) => {
|
||||
await updateUserProfileViaApi(ctx, { week_start: 'monday' });
|
||||
await goToCalendar(page);
|
||||
await updateUserProfileViaWeb(page, { week_start: 'monday' });
|
||||
await page.reload();
|
||||
await expect(page.locator('.fc')).toBeVisible();
|
||||
|
||||
const firstHeader = page.locator('.fc-col-header-cell').first();
|
||||
await expect(firstHeader).toContainText('Mon');
|
||||
});
|
||||
|
||||
test('week start day: sunday shows Sun as first column', async ({ page }) => {
|
||||
test('week start day: sunday shows Sun as first column', async ({ page, ctx }) => {
|
||||
await updateUserProfileViaApi(ctx, { week_start: 'sunday' });
|
||||
await goToCalendar(page);
|
||||
await updateUserProfileViaWeb(page, { week_start: 'sunday' });
|
||||
await page.reload();
|
||||
await expect(page.locator('.fc')).toBeVisible();
|
||||
|
||||
const firstHeader = page.locator('.fc-col-header-cell').first();
|
||||
await expect(firstHeader).toContainText('Sun');
|
||||
|
||||
// Reset to monday for other tests
|
||||
await updateUserProfileViaWeb(page, { week_start: 'monday' });
|
||||
});
|
||||
|
||||
test('12-hour time format shows AM/PM on slot labels', async ({ page, ctx }) => {
|
||||
|
||||
Reference in New Issue
Block a user