Files
crowd-funder-for-time-pwa/test-playwright/active-identity-smoke.spec.ts
Matthew Raymer 552196c18f test: add active identity migration end-to-end testing
- Add comprehensive migration test suite for identity switching
- Include smoke tests for basic page loading and navigation
- Test migration persistence, error handling, and data preservation
- Validate Active Identity façade functionality

Ensures the migration system works correctly across
all phases and maintains data integrity.
2025-08-22 10:40:00 +00:00

58 lines
2.0 KiB
TypeScript

import { test, expect } from '@playwright/test';
/**
* Active Identity Migration - Smoke Test
*
* Simple test to verify the basic functionality works without complex setup
*
* @author Matthew Raymer
* @date 2025-08-22T07:20Z
*/
test.describe('Active Identity Migration - Smoke Test', () => {
test('should load identity switcher page without errors', async ({ page }) => {
// Navigate to account page
await page.goto('./account');
await page.waitForLoadState('networkidle');
// Verify page loads
await expect(page.locator('h1:has-text("Account")')).toBeVisible();
// Click advanced settings to reveal identity switcher
await page.getByTestId('advancedSettings').click();
// Verify identity switcher link is visible
const switchIdentityLink = page.locator('#switch-identity-link');
await expect(switchIdentityLink).toBeVisible();
// Click to open identity switcher
await switchIdentityLink.click();
// Verify we're on the identity switcher page
await expect(page.locator('h1:has-text("Switch Identity")')).toBeVisible();
// Verify basic elements are present
await expect(page.locator('#start-link')).toBeVisible();
// This test verifies that:
// 1. The account page loads
// 2. The identity switcher can be accessed
// 3. The identity switcher page loads without errors
// 4. Our migrated components are functional
});
test('should load home page with active identity without errors', async ({ page }) => {
// Navigate to home page (which uses our migrated activeDid logic)
await page.goto('./home');
await page.waitForLoadState('networkidle');
// Verify page loads without errors
await expect(page.locator('h1:has-text("Home")')).toBeVisible();
// This test verifies that:
// 1. HomeView.vue loads correctly with our migrated activeDid logic
// 2. The new façade methods work without throwing errors
// 3. The page renders properly
});
});