have the user accept an invitation (to avoid previews from stealing it)

This commit is contained in:
2026-01-10 18:46:01 -07:00
parent 051af89476
commit 02eb891ee9
4 changed files with 74 additions and 42 deletions

View File

@@ -17,8 +17,10 @@
* - Custom notes
* 3. Verifies the invite appears in the list
* 4. Creates a new user with Ethr DID
* 5. Accepts the invitation as the new user
* 6. Verifies the connection is established
* 5. Navigates to the invitation link
* 6. Confirms the invitation in the acceptance dialog
* 7. Accepts the invitation as the new user
* 8. Verifies the connection is established
*
* Related Files:
* - Frontend invite handling: src/libs/endorserServer.ts
@@ -55,6 +57,10 @@ test('Check User 0 can invite someone', async ({ page }) => {
await switchToUser(page, newDid);
await page.goto(inviteLink as string);
// Wait for and click the Accept button in the confirmation dialog
await expect(page.locator('button:has-text("Accept")')).toBeVisible();
await page.locator('button:has-text("Accept")').click();
// Wait for the ContactNameDialog to appear before trying to fill the Name field
await expect(page.getByPlaceholder('Name', { exact: true })).toBeVisible();
await page.getByPlaceholder('Name', { exact: true }).fill(`My pal User #0`);