|
@ -8,6 +8,7 @@ |
|
|
* - Custom expiration date |
|
|
* - Custom expiration date |
|
|
* 2. The invitation appears in the list after creation |
|
|
* 2. The invitation appears in the list after creation |
|
|
* 3. A new user can accept the invitation and become connected |
|
|
* 3. A new user can accept the invitation and become connected |
|
|
|
|
|
* 4. The new user can create gift records from the front page |
|
|
* |
|
|
* |
|
|
* Test Flow: |
|
|
* Test Flow: |
|
|
* 1. Imports User 0 (test account) |
|
|
* 1. Imports User 0 (test account) |
|
@ -19,6 +20,8 @@ |
|
|
* 4. Creates a new user with Ethr DID |
|
|
* 4. Creates a new user with Ethr DID |
|
|
* 5. Accepts the invitation as the new user |
|
|
* 5. Accepts the invitation as the new user |
|
|
* 6. Verifies the connection is established |
|
|
* 6. Verifies the connection is established |
|
|
|
|
|
* 7. Tests that the new user can create gift records from the front page |
|
|
|
|
|
* 8. Verifies the gift appears in the home view |
|
|
* |
|
|
* |
|
|
* Related Files: |
|
|
* Related Files: |
|
|
* - Frontend invite handling: src/libs/endorserServer.ts |
|
|
* - Frontend invite handling: src/libs/endorserServer.ts |
|
@ -29,7 +32,7 @@ |
|
|
* @requires ./testUtils - For user management utilities |
|
|
* @requires ./testUtils - For user management utilities |
|
|
*/ |
|
|
*/ |
|
|
import { test, expect } from '@playwright/test'; |
|
|
import { test, expect } from '@playwright/test'; |
|
|
import { deleteContact, generateNewEthrUser, generateRandomString, importUser, switchToUser } from './testUtils'; |
|
|
import { createGiftFromFrontPageForNewUser, deleteContact, generateNewEthrUser, generateRandomString, importUser, switchToUser } from './testUtils'; |
|
|
|
|
|
|
|
|
test('Check User 0 can invite someone', async ({ page }) => { |
|
|
test('Check User 0 can invite someone', async ({ page }) => { |
|
|
await importUser(page, '00'); |
|
|
await importUser(page, '00'); |
|
@ -58,4 +61,7 @@ test('Check User 0 can invite someone', async ({ page }) => { |
|
|
await page.locator('button:has-text("Save")').click(); |
|
|
await page.locator('button:has-text("Save")').click(); |
|
|
await expect(page.locator('button:has-text("Save")')).toBeHidden(); |
|
|
await expect(page.locator('button:has-text("Save")')).toBeHidden(); |
|
|
await expect(page.locator(`li:has-text("My pal User #0")`)).toBeVisible(); |
|
|
await expect(page.locator(`li:has-text("My pal User #0")`)).toBeVisible(); |
|
|
|
|
|
|
|
|
|
|
|
// Verify the new user can create a gift record from the front page
|
|
|
|
|
|
const giftTitle = await createGiftFromFrontPageForNewUser(page, `Gift from new user ${neighborNum}`); |
|
|
}); |
|
|
}); |
|
|