forked from trent_larson/crowd-funder-for-time-pwa
Fix duplicate export declarations and migrate ContactsView with sub-components
- Remove duplicate NOTIFY_INVITE_MISSING and NOTIFY_INVITE_PROCESSING_ERROR exports - Update InviteOneAcceptView.vue to use correct NOTIFY_INVITE_TRUNCATED_DATA constant - Migrate ContactsView to PlatformServiceMixin and extract into modular sub-components - Resolves TypeScript compilation errors preventing web build
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
* @requires ./testUtils - For user management utilities
|
||||
*/
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { deleteContact, generateAndRegisterEthrUser, generateRandomString, importUser, switchToUser } from './testUtils';
|
||||
import { deleteContact, generateNewEthrUser, generateRandomString, importUser, switchToUser } from './testUtils';
|
||||
|
||||
test('Check User 0 can invite someone', async ({ page }) => {
|
||||
await importUser(page, '00');
|
||||
@@ -51,37 +51,9 @@ test('Check User 0 can invite someone', async ({ page }) => {
|
||||
expect(inviteLink).not.toBeNull();
|
||||
|
||||
// become the new user and accept the invite
|
||||
const newDid = await generateAndRegisterEthrUser(page);
|
||||
const newDid = await generateNewEthrUser(page);
|
||||
await switchToUser(page, newDid);
|
||||
|
||||
// Extract the JWT from the invite link and navigate to local development server
|
||||
const jwt = inviteLink?.split('/').pop();
|
||||
if (!jwt) {
|
||||
throw new Error('Could not extract JWT from invite link');
|
||||
}
|
||||
await page.goto(`./deep-link/invite-one-accept/${jwt}`);
|
||||
|
||||
// Wait for redirect to contacts page and dialog to appear
|
||||
await page.waitForURL('**/contacts**');
|
||||
|
||||
// Wait a bit for any processing to complete
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
// Check if the dialog appears, if not, check for registration errors
|
||||
const dialogVisible = await page.locator('input[placeholder="Name"]').isVisible().catch(() => false);
|
||||
|
||||
if (!dialogVisible) {
|
||||
const bodyText = await page.locator('body').textContent();
|
||||
|
||||
// Check if this is a registration error
|
||||
if (bodyText?.includes('not registered to make claims')) {
|
||||
test.skip(true, 'User #0 not registered on test server. Please ensure endorser server is running and User #0 is registered.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Wait for the dialog to appear and then fill the name
|
||||
await page.waitForSelector('input[placeholder="Name"]', { timeout: 10000 });
|
||||
await page.goto(inviteLink as string);
|
||||
await page.getByPlaceholder('Name', { exact: true }).fill(`My pal User #0`);
|
||||
await page.locator('button:has-text("Save")').click();
|
||||
await expect(page.locator('button:has-text("Save")')).toBeHidden();
|
||||
|
||||
Reference in New Issue
Block a user