/** * BDD E2E Test: Sponsor Signup & Onboarding * * Tests the sponsor onboarding functionality that allows: * - Prospective sponsors to view sponsorship opportunities * - New sponsors to create accounts * - Existing sponsors to log in * - Form validation and error handling * * Focus: Final user outcomes - what the sponsor sees and can verify */ import { test, expect } from '@playwright/test'; test.describe('Sponsor Signup & Onboarding', () => { test.beforeEach(async ({ page }) => { // TODO: Implement navigation setup // - Navigate to sponsor signup page // - Verify page loads successfully }); test('Prospective sponsor views landing page with sponsorship opportunities', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor views landing page // Given I am a prospective sponsor // And I navigate to the sponsor signup page // Then I should see sponsorship opportunity types // And I should see platform statistics // And I should see benefits and features // And I should see call-to-action buttons }); test('Prospective sponsor can view sponsorship type details', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor explores sponsorship types // Given I am on the sponsor landing page // When I view the sponsorship types section // Then I should see league sponsorship details // And I should see team sponsorship details // And I should see driver sponsorship details // And I should see race sponsorship details // And I should see platform advertising details }); test('Prospective sponsor can navigate to signup form', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor navigates to signup // Given I am on the sponsor landing page // When I click "Create Sponsor Account" // Then I should see the signup form // And I should see company information fields // And I should see sponsorship interest selection }); test('Prospective sponsor can navigate to login form', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor navigates to login // Given I am on the sponsor landing page // When I click "Sign In" // Then I should see the login form // And I should see email and password fields // And I should see "Forgot password" option }); test('New sponsor can create account with valid information', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor creates account // Given I am on the signup form // When I enter valid company name // And I enter valid contact email // And I enter valid website URL // And I select sponsorship interests // And I upload a company logo // And I enter a valid password // And I confirm the password // And I accept terms and conditions // And I acknowledge VAT policy // And I click "Create Sponsor Account" // Then I should be logged in // And I should be redirected to the dashboard }); test('New sponsor sees validation errors for invalid signup data', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor sees signup validation errors // Given I am on the signup form // When I submit with missing company name // Then I should see "Company name required" error // When I submit with invalid email // Then I should see "Invalid email format" error // When I submit with password too short // Then I should see "Password must be at least 8 characters" error // When I submit with mismatched passwords // Then I should see "Passwords do not match" error // When I submit without accepting terms // Then I should see "You must accept the terms and conditions" error }); test('New sponsor sees sponsorship interest selection', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor selects sponsorship interests // Given I am on the signup form // When I view sponsorship interests section // Then I should see all sponsorship type options // And I should be able to select multiple interests // And I should see selected interests highlighted }); test('New sponsor can upload company logo', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor uploads logo // Given I am on the signup form // When I click to upload a logo // And I select a valid image file // Then I should see the logo preview // And I should see file format requirements }); test('New sponsor sees logo upload requirements', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor sees logo requirements // Given I am on the signup form // When I view the logo upload section // Then I should see supported file formats // And I should see recommended dimensions // And I should see file size limits }); test('Existing sponsor can log in with valid credentials', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor logs in // Given I am on the login form // When I enter valid email // And I enter valid password // And I click "Sign In" // Then I should be logged in // And I should be redirected to the dashboard }); test('Existing sponsor sees login error for invalid credentials', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor sees login error // Given I am on the login form // When I enter invalid email // And I enter invalid password // And I click "Sign In" // Then I should see an error message // And I should remain on the login page }); test('Sponsor can navigate between landing, signup, and login modes', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor navigates between modes // Given I am on the sponsor signup page // When I click "Back to overview" // Then I should see the landing page // When I click "Create Sponsor Account" // Then I should see the signup form // When I click "Sign In" // Then I should see the login form }); test('Sponsor can switch from login to signup', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor switches to signup // Given I am on the login form // When I click "Create one" // Then I should see the signup form }); test('Sponsor can switch from signup to login', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor switches to login // Given I am on the signup form // When I click "Sign in" // Then I should see the login form }); test('Sponsor sees platform statistics on landing page', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor views platform stats // Given I am on the sponsor landing page // When I view the statistics section // Then I should see monthly race views // And I should see active drivers count // And I should see racing leagues count // And I should see average engagement rate }); test('Sponsor sees benefits section on landing page', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor views benefits // Given I am on the sponsor landing page // When I view the benefits section // Then I should see real visibility benefit // And I should see detailed analytics benefit // And I should see targeted reach benefit // And I should see trusted platform benefit // And I should see engaged community benefit // And I should see growth potential benefit }); test('Sponsor sees workflow explanation on landing page', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor views workflow // Given I am on the sponsor landing page // When I view the workflow section // Then I should see how sponsorship works // And I should see the process steps }); test('Sponsor can contact sales from landing page', async ({ page }) => { // TODO: Implement test // Scenario: Sponsor contacts sales // Given I am on the sponsor landing page // When I click "Contact Sales" // Then I should see the email client opened // And I should see the sponsor email address }); });