Files
crowd-funder-for-time-pwa/test-playwright/active-identity-smoke.spec.ts
Matthew Raymer 4ea72162ec fix(active-identity): complete component migration to new Active Identity system
Fixes gift recording functionality by migrating remaining components from
legacy settings.activeDid to new $getActiveDid() method. Migration 004
dropped settings.activeDid column before all components were updated,
causing validation failures in GiftedDialog, OfferDialog, and
OnboardingDialog. Added comprehensive logging to $getActiveDid() method
and HomeView initialization for debugging. Test "Check User 0 can register
a random person" now passes consistently.

- GiftedDialog, OfferDialog, OnboardingDialog use new Active Identity system
- Enhanced logging in PlatformServiceMixin.$getActiveDid() method
- Added debugging logs to HomeView component lifecycle
- Fixed Playwright test navigation and element selectors
2025-08-22 12:10:52 +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('./');
await page.waitForLoadState('networkidle');
// Verify page loads without errors
await expect(page.locator('#ViewHeading')).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
});
});