adjust test lines to await/expect appropriately

This commit is contained in:
2024-11-07 19:07:45 -07:00
parent a73f0239c9
commit a3b10d9a78
5 changed files with 15 additions and 13 deletions

View File

@@ -85,11 +85,11 @@ export async function generateAndRegisterEthrUser(page: Page): Promise<string> {
const contactName = createContactName(newDid);
await page.getByPlaceholder('URL or DID, Name, Public Key').fill(`${newDid}, ${contactName}`);
await page.locator('button > svg.fa-plus').click();
await page.locator('li', { hasText: contactName }).click();
// register them
await page.locator('div[role="alert"] button:has-text("Yes")').click();
// wait for it to disappear because the next steps may depend on alerts being gone
await expect(page.locator('div[role="alert"] button:has-text("Yes")')).toBeHidden();
await expect(page.locator('li', { hasText: contactName })).toBeVisible();
return newDid;
}