feat: return not found. on /setup if already completed

This commit is contained in:
Elias Schneider
2026-04-19 20:13:19 +02:00
parent a0cb574313
commit 444f7ff2b0
6 changed files with 64 additions and 16 deletions

View File

@@ -81,15 +81,11 @@ test.describe('Initial User Signup', () => {
await expect(page.getByText('Set up your passkey')).toBeVisible();
});
test('Initial Signup - setup already completed', async ({ page }) => {
test('Initial Signup - setup route unavailable after completion', async ({ page }) => {
await cleanupBackend();
await page.goto('/setup');
await page.getByLabel('First name').fill('Test');
await page.getByLabel('Last name').fill('User');
await page.getByLabel('Username').fill('testuser123');
await page.getByLabel('Email').fill(users.tim.email);
await page.getByRole('button', { name: 'Sign Up' }).click();
await expect(page.getByText('Setup already completed')).toBeVisible();
await expect(page.getByText('Not found')).toBeVisible();
await expect(page.getByRole('button', { name: 'Sign Up' })).not.toBeVisible();
});
});