refactor invite link & add test

This commit is contained in:
2024-10-08 08:36:32 -06:00
parent 2e100aedf5
commit 98afa8a259
8 changed files with 81 additions and 37 deletions

View File

@@ -1,5 +1,5 @@
import { test, expect } from '@playwright/test';
import { deleteContact, generateEthrUser, importUser } from './testUtils';
import { deleteContact, generateAndRegisterEthrUser, importUser } from './testUtils';
test('Check activity feed', async ({ page }) => {
// Load app homepage
@@ -112,12 +112,12 @@ test('Confirm test API setting (may fail if you are running your own Time Safari
test('Check User 0 can register a random person', async ({ page }) => {
await importUser(page, '00');
const newDid = await generateEthrUser(page);
const newDid = await generateAndRegisterEthrUser(page);
expect(newDid).toContain('did:ethr:');
await page.goto('./');
await page.getByRole('heading', { name: 'Unnamed/Unknown' }).click();
await page.getByPlaceholder('What was given').fill('Access!');
await page.getByPlaceholder('What was given').fill('Gave me access!');
await page.getByRole('button', { name: 'Sign & Send' }).click();
await expect(page.getByText('That gift was recorded.')).toBeVisible();
// now ensure that alert goes away