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
@@ -0,0 +1,34 @@
import { beforeEach, describe, expect, it } from 'vitest';
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { renderApp, mockGuest } from '@/test/utils';
import { _resetSetupStatusCache } from '@/router';
beforeEach(() => {
_resetSetupStatusCache();
});
describe('AccessDeniedPage', () => {
it('renders the 403 title and message', async () => {
renderApp('/403');
expect(await screen.findByTestId('access-denied-title', {}, { timeout: 5000 })).toBeInTheDocument();
expect(screen.getByTestId('access-denied-message')).toBeInTheDocument();
});
it('renders the back to dashboard button', async () => {
renderApp('/403');
expect(await screen.findByTestId('access-denied-back-button', {}, { timeout: 5000 })).toBeInTheDocument();
});
it('navigates to login when back button is clicked as guest', async () => {
mockGuest();
renderApp('/403');
const button = await screen.findByTestId('access-denied-back-button', {}, { timeout: 5000 });
await userEvent.click(button);
expect(await screen.findByTestId('login-form-submit-button')).toBeInTheDocument();
});
});