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

@@ -10,29 +10,21 @@
* Focus: Final user outcomes - what the driver sees and can verify
*/
import { test, expect } from '@playwright/test';
import { expect, testWithAuth } from '../../shared/auth-fixture';
test.describe('Profile Main Page', () => {
test.beforeEach(async ({ page }) => {
// TODO: Implement authentication setup for a registered driver
// - Navigate to login page
// - Enter credentials for "John Doe" or similar test driver
// - Verify successful login
// - Navigate to /profile page
testWithAuth.describe('Profile Main Page', () => {
testWithAuth.beforeEach(async ({ authenticatedDriver }) => {
await authenticatedDriver.goto('/profile');
await authenticatedDriver.waitForLoadState('networkidle');
});
test('Driver sees their profile information on main page', async ({ page }) => {
// TODO: Implement test
// Scenario: Driver views their profile information
// Given I am a registered driver "John Doe"
// And I am on the "Profile" page
// Then I should see my name prominently displayed
// And I should see my avatar
// And I should see my bio (if available)
// And I should see my location or country (if available)
testWithAuth('Driver sees their profile information on main page', async ({ authenticatedDriver }) => {
await expect(authenticatedDriver.getByTestId('profile-name')).toBeVisible();
await expect(authenticatedDriver.getByTestId('profile-avatar')).toBeVisible();
await expect(authenticatedDriver.getByTestId('profile-bio')).toBeVisible();
});
test('Driver sees profile statistics on main page', async ({ page }) => {
test('Driver sees profile statistics on main page', async () => {
// TODO: Implement test
// Scenario: Driver views their profile statistics
// Given I am a registered driver "John Doe"
@@ -45,7 +37,7 @@ test.describe('Profile Main Page', () => {
// And I should see my win percentage
});
test('Driver can navigate to leagues page from profile', async ({ page }) => {
test('Driver can navigate to leagues page from profile', async () => {
// TODO: Implement test
// Scenario: Driver navigates to leagues page
// Given I am a registered driver "John Doe"
@@ -55,7 +47,7 @@ test.describe('Profile Main Page', () => {
// And the URL should be /profile/leagues
});
test('Driver can navigate to liveries page from profile', async ({ page }) => {
test('Driver can navigate to liveries page from profile', async () => {
// TODO: Implement test
// Scenario: Driver navigates to liveries page
// Given I am a registered driver "John Doe"
@@ -65,7 +57,7 @@ test.describe('Profile Main Page', () => {
// And the URL should be /profile/liveries
});
test('Driver can navigate to settings page from profile', async ({ page }) => {
test('Driver can navigate to settings page from profile', async () => {
// TODO: Implement test
// Scenario: Driver navigates to settings page
// Given I am a registered driver "John Doe"
@@ -75,7 +67,7 @@ test.describe('Profile Main Page', () => {
// And the URL should be /profile/settings
});
test('Driver can navigate to sponsorship requests page from profile', async ({ page }) => {
test('Driver can navigate to sponsorship requests page from profile', async () => {
// TODO: Implement test
// Scenario: Driver navigates to sponsorship requests page
// Given I am a registered driver "John Doe"
@@ -85,7 +77,7 @@ test.describe('Profile Main Page', () => {
// And the URL should be /profile/sponsorship-requests
});
test('Driver sees profile achievements section', async ({ page }) => {
test('Driver sees profile achievements section', async () => {
// TODO: Implement test
// Scenario: Driver views their achievements
// Given I am a registered driver "John Doe"
@@ -95,7 +87,7 @@ test.describe('Profile Main Page', () => {
// And I should see progress indicators for ongoing achievements
});
test('Driver sees recent activity on profile page', async ({ page }) => {
test('Driver sees recent activity on profile page', async () => {
// TODO: Implement test
// Scenario: Driver views recent activity
// Given I am a registered driver "John Doe"
@@ -105,7 +97,7 @@ test.describe('Profile Main Page', () => {
// And each activity should have a timestamp
});
test('Driver sees profile completion indicator', async ({ page }) => {
test('Driver sees profile completion indicator', async () => {
// TODO: Implement test
// Scenario: Driver sees profile completion status
// Given I am a registered driver "John Doe"
@@ -115,7 +107,7 @@ test.describe('Profile Main Page', () => {
// And I should see which sections are incomplete
});
test('Driver can edit profile from main page', async ({ page }) => {
test('Driver can edit profile from main page', async () => {
// TODO: Implement test
// Scenario: Driver edits profile from main page
// Given I am a registered driver "John Doe"
@@ -125,7 +117,7 @@ test.describe('Profile Main Page', () => {
// And I should be able to edit my profile information
});
test('Driver sees empty state when no leagues joined', async ({ page }) => {
test('Driver sees empty state when no leagues joined', async () => {
// TODO: Implement test
// Scenario: Driver with no league memberships
// Given I am a registered driver "John Doe"
@@ -136,7 +128,7 @@ test.describe('Profile Main Page', () => {
// And I should see a call-to-action to discover leagues
});
test('Driver sees empty state when no liveries uploaded', async ({ page }) => {
test('Driver sees empty state when no liveries uploaded', async () => {
// TODO: Implement test
// Scenario: Driver with no liveries
// Given I am a registered driver "John Doe"
@@ -147,7 +139,7 @@ test.describe('Profile Main Page', () => {
// And I should see a call-to-action to upload a livery
});
test('Driver sees empty state when no sponsorship requests', async ({ page }) => {
test('Driver sees empty state when no sponsorship requests', async () => {
// TODO: Implement test
// Scenario: Driver with no sponsorship requests
// Given I am a registered driver "John Doe"
@@ -158,7 +150,7 @@ test.describe('Profile Main Page', () => {
// And I should see information about how to get sponsorships
});
test('Driver sees profile with SEO metadata', async ({ page }) => {
test('Driver sees profile with SEO metadata', async () => {
// TODO: Implement test
// Scenario: Driver verifies SEO metadata
// Given I am a registered driver "John Doe"
@@ -168,7 +160,7 @@ test.describe('Profile Main Page', () => {
// And the page should have Open Graph tags for social sharing
});
test('Driver sees consistent profile layout', async ({ page }) => {
test('Driver sees consistent profile layout', async () => {
// TODO: Implement test
// Scenario: Driver verifies profile layout consistency
// Given I am on the "Profile" page
@@ -177,7 +169,7 @@ test.describe('Profile Main Page', () => {
// And the styling should match the design system
});
test('Driver sees profile with team affiliation', async ({ page }) => {
test('Driver sees profile with team affiliation', async () => {
// TODO: Implement test
// Scenario: Driver views their team affiliation
// Given I am a registered driver "John Doe"
@@ -188,7 +180,7 @@ test.describe('Profile Main Page', () => {
// And I should see my role in the team
});
test('Driver sees profile with social links', async ({ page }) => {
test('Driver sees profile with social links', async () => {
// TODO: Implement test
// Scenario: Driver views their social links
// Given I am a registered driver "John Doe"