fix tests

This commit is contained in:
2024-08-20 20:05:04 -06:00
parent 6aef08d7e8
commit 67b0122d5a
4 changed files with 19 additions and 8 deletions

View File

@@ -39,7 +39,7 @@ test('Add contact, record gift, confirm gift', async ({ page }) => {
await expect(page.locator('li.border-b')).toContainText('User #000');
// Rename contact
await page.locator('li.border-b h2 > a[title="See more about this person"]').click();
await page.locator('li.border-b div div > a[title="See more about this person"]').click();
await page.locator('h2 > button[title="Edit"]').click();
await expect(page.locator('div.dialog-overlay > div.dialog').filter({ hasText: 'Edit Name' })).toBeVisible();
await page.getByPlaceholder('Name', { exact: true }).fill(contactName);
@@ -83,4 +83,4 @@ test('Add contact, record gift, confirm gift', async ({ page }) => {
// Refresh claim page, Confirm button should be hidden
await page.reload();
await expect(page.getByRole('button', { name: 'Confirm' })).toBeHidden();
});
});

View File

@@ -1,6 +1,6 @@
import { expect } from '@playwright/test';
import { expect, Page } from '@playwright/test';
export async function importUser(page, id) {
export async function importUser(page: Page, id?: string): Promise<void> {
let seedPhrase, userName, did;
// Set seed phrase and DID based on user ID