code quality
Some checks failed
CI / lint-typecheck (pull_request) Failing after 13s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped

This commit is contained in:
2026-01-27 16:30:03 +01:00
parent 9b31eaf728
commit 9894c4a841
34 changed files with 926 additions and 536 deletions

View File

@@ -9,28 +9,22 @@
* Focus: Final user outcomes - what the driver sees and can verify
*/
import { test, expect } from '@playwright/test';
import { expect } from '@playwright/test';
import { testWithAuth } from '../../shared/auth-fixture';
test.describe('Onboarding Wizard Flow', () => {
test.beforeEach(async ({ page }) => {
// TODO: Implement authentication setup
// - Navigate to login page
// - Enter credentials for a new user (not yet onboarded)
// - Verify successful login
// - Verify redirection to onboarding page
testWithAuth.describe('Onboarding Wizard Flow', () => {
testWithAuth.beforeEach(async ({ unonboardedDriver }) => {
// Navigate to onboarding page (assuming user needs onboarding)
await unonboardedDriver.goto('/onboarding');
await unonboardedDriver.waitForLoadState('networkidle');
});
test('New user is redirected to onboarding after login', async ({ page }) => {
// TODO: Implement test
// Scenario: New user is redirected to onboarding
// Given I am a new registered user "John Doe"
// And I have not completed onboarding
// When I log in
// Then I should be redirected to the onboarding page
// And I should see the onboarding wizard
testWithAuth('New user sees onboarding wizard after authentication', async ({ unonboardedDriver }) => {
await expect(unonboardedDriver.getByTestId('onboarding-wizard')).toBeVisible();
await expect(unonboardedDriver.getByTestId('step-1-personal-info')).toBeVisible();
});
test('User sees onboarding wizard with two steps', async ({ page }) => {
testWithAuth('User sees onboarding wizard with two steps', async () => {
// TODO: Implement test
// Scenario: User sees onboarding wizard structure
// Given I am on the onboarding page
@@ -39,7 +33,7 @@ test.describe('Onboarding Wizard Flow', () => {
// And I should see a progress indicator
});
test('User can navigate between onboarding steps', async ({ page }) => {
testWithAuth('User can navigate between onboarding steps', async () => {
// TODO: Implement test
// Scenario: User navigates between steps
// Given I am on the onboarding page
@@ -50,7 +44,7 @@ test.describe('Onboarding Wizard Flow', () => {
// Then I should see step 1 again
});
test('User completes onboarding and is redirected to dashboard', async ({ page }) => {
testWithAuth('User completes onboarding and is redirected to dashboard', async () => {
// TODO: Implement test
// Scenario: User completes onboarding
// Given I am on the onboarding page
@@ -61,7 +55,7 @@ test.describe('Onboarding Wizard Flow', () => {
// And I should see my profile information
});
test('User sees onboarding help panel', async ({ page }) => {
testWithAuth('User sees onboarding help panel', async () => {
// TODO: Implement test
// Scenario: User sees help information
// Given I am on the onboarding page
@@ -69,7 +63,7 @@ test.describe('Onboarding Wizard Flow', () => {
// And I should see instructions for the current step
});
test('User sees avatar generation help on step 2', async ({ page }) => {
testWithAuth('User sees avatar generation help on step 2', async () => {
// TODO: Implement test
// Scenario: User sees avatar generation help
// Given I am on step 2 of onboarding
@@ -77,7 +71,7 @@ test.describe('Onboarding Wizard Flow', () => {
// And I should see tips for taking a good photo
});
test('User cannot skip required onboarding steps', async ({ page }) => {
testWithAuth('User cannot skip required onboarding steps', async () => {
// TODO: Implement test
// Scenario: User cannot skip steps
// Given I am on the onboarding page
@@ -86,7 +80,7 @@ test.describe('Onboarding Wizard Flow', () => {
// And I should not be able to proceed
});
test('User sees processing state during submission', async ({ page }) => {
testWithAuth('User sees processing state during submission', async () => {
// TODO: Implement test
// Scenario: User sees processing indicator
// Given I am on the onboarding page
@@ -95,7 +89,7 @@ test.describe('Onboarding Wizard Flow', () => {
// And I should not be able to submit again
});
test('User sees error state when submission fails', async ({ page }) => {
testWithAuth('User sees error state when submission fails', async () => {
// TODO: Implement test
// Scenario: User sees submission error
// Given I am on the onboarding page
@@ -105,7 +99,7 @@ test.describe('Onboarding Wizard Flow', () => {
// And I should be able to retry
});
test('User sees already onboarded redirect', async ({ page }) => {
testWithAuth('User sees already onboarded redirect', async () => {
// TODO: Implement test
// Scenario: Already onboarded user is redirected
// Given I am a user who has already completed onboarding
@@ -114,7 +108,7 @@ test.describe('Onboarding Wizard Flow', () => {
// And I should not see the onboarding wizard
});
test('User sees unauthorized redirect when not logged in', async ({ page }) => {
testWithAuth('User sees unauthorized redirect when not logged in', async () => {
// TODO: Implement test
// Scenario: Unauthorized user is redirected
// Given I am not logged in