WIP: improve font caching and partial fix on test

This commit is contained in:
Matthew Raymer
2025-07-27 01:56:42 +00:00
parent c628c78565
commit e04c9f3626
16 changed files with 338 additions and 87 deletions

View File

@@ -1,5 +1,5 @@
import { test, expect } from '@playwright/test';
import { switchToUser, getTestUserData } from './testUtils';
import { switchToUser, getTestUserData, importUserFromAccount } from './testUtils';
test('New offers for another user', async ({ page }) => {
await page.goto('./');
@@ -15,30 +15,9 @@ test('New offers for another user', async ({ page }) => {
await page.getByTestId('closeOnboardingAndFinish').click();
await expect(page.getByTestId('newDirectOffersActivityNumber')).toBeHidden();
// Navigate to AccountViewView to use the Identity Switcher
await page.goto('./account');
// Click "Show Advanced Settings" to reveal the identity switcher
await page.getByTestId('advancedSettings').click();
// Use the identity switcher to add User Zero
await page.locator('#switch-identity-link').click();
await page.locator('#start-link').click();
// Select "You have a seed" option
await page.getByText('You have a seed').click();
// Get User Zero's seed phrase using the new method
const userZeroData = getTestUserData('00');
// Enter User Zero's seed phrase
await page.getByPlaceholder('Seed Phrase').fill(userZeroData.seedPhrase);
await page.getByRole('button', { name: 'Import' }).click();
// Wait for import to complete
await page.waitForLoadState('networkidle');
// Become User Zero
await importUserFromAccount(page, "00");
// As User Zero, add the auto-created DID as a contact
await page.goto('./contacts');
await page.getByPlaceholder('URL or DID, Name, Public Key').fill(autoCreatedDid + ', A Friend');