Adds profile and settings pages

This commit is contained in:
2026-06-22 23:59:04 +02:00
parent 6976eb4337
commit 2544e20b3c
49 changed files with 2741 additions and 34 deletions
+24
View File
@@ -0,0 +1,24 @@
import { beforeEach, describe, expect, it } from 'vitest';
import { screen } from '@testing-library/react';
import { renderApp, mockAuthenticated, mockGuest } from '@/test/utils';
import { _resetSetupStatusCache } from '@/router';
beforeEach(() => {
_resetSetupStatusCache();
});
describe('CmsPage', () => {
it('renders the CMS page title and placeholder', async () => {
mockAuthenticated();
renderApp('/cms');
expect(await screen.findByTestId('cms-title', {}, { timeout: 5000 })).toBeInTheDocument();
expect(screen.getByTestId('cms-placeholder')).toBeInTheDocument();
});
it('redirects unauthenticated users to login', async () => {
mockGuest();
renderApp('/cms');
expect(await screen.findByTestId('login-form-submit-button')).toBeInTheDocument();
});
});