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

@@ -16,11 +16,11 @@ test('Check User 0 can invite someone', async ({ page }) => {
await expect(page.locator('div[role="alert"] button:has-text("Yes")')).toBeHidden();
// check that the invite is in the list
const newInviteLine = await page.locator(`td:has-text("Neighbor ${neighborNum}")`);
const newInviteLine = page.locator(`td:has-text("Neighbor ${neighborNum}")`);
await expect(newInviteLine).toBeVisible();
// retrieve the link from the title
const inviteLink = await newInviteLine.getAttribute('data-testId');
await expect(inviteLink).not.toBeNull();
expect(inviteLink).not.toBeNull();
// become the new user and accept the invite
await switchToUser(page, newDid);