|
@ -102,7 +102,7 @@ test('Add contact, record gift, confirm gift', async ({ page }) => { |
|
|
await expect(page.locator('li.border-b')).toContainText(userName); |
|
|
await expect(page.locator('li.border-b')).toContainText(userName); |
|
|
|
|
|
|
|
|
// Rename contact
|
|
|
// Rename contact
|
|
|
await page.locator(`li[data-testid="contactListItem"] h2:has-text("${userName}") + span svg.fa-circle-info`).click(); |
|
|
await page.getByTestId(`contactListItem`).locator(`h2 a:has-text("${userName}")`).click(); |
|
|
// now on the DID view page
|
|
|
// now on the DID view page
|
|
|
await page.locator('h2 svg.fa-pen').click(); |
|
|
await page.locator('h2 svg.fa-pen').click(); |
|
|
// now on the contact edit page
|
|
|
// now on the contact edit page
|
|
@ -116,10 +116,11 @@ test('Add contact, record gift, confirm gift', async ({ page }) => { |
|
|
// Confirm that home shows contact in "Record Something…"
|
|
|
// Confirm that home shows contact in "Record Something…"
|
|
|
await page.goto('./'); |
|
|
await page.goto('./'); |
|
|
await page.getByTestId('closeOnboardingAndFinish').click(); |
|
|
await page.getByTestId('closeOnboardingAndFinish').click(); |
|
|
await expect(page.locator('#sectionRecordSomethingGiven ul li').filter({ hasText: contactName }).nth(0)).toBeVisible(); |
|
|
const userGaveLink = page.locator('#sectionRecordSomethingGiven ul li').filter({ hasText: contactName }).nth(0); |
|
|
|
|
|
await expect(userGaveLink).toBeVisible(); |
|
|
|
|
|
await userGaveLink.click(); |
|
|
|
|
|
|
|
|
// Record something given by new contact
|
|
|
// Record something given by new contact
|
|
|
await page.getByRole('heading', { name: contactName }).click(); |
|
|
|
|
|
await page.getByPlaceholder('What was given').fill(finalTitle); |
|
|
await page.getByPlaceholder('What was given').fill(finalTitle); |
|
|
await page.getByRole('spinbutton').fill(randomNonZeroNumber.toString()); |
|
|
await page.getByRole('spinbutton').fill(randomNonZeroNumber.toString()); |
|
|
await page.getByRole('button', { name: 'Sign & Send' }).click(); |
|
|
await page.getByRole('button', { name: 'Sign & Send' }).click(); |
|
@ -130,7 +131,7 @@ test('Add contact, record gift, confirm gift', async ({ page }) => { |
|
|
|
|
|
|
|
|
// Firefox complains on load the initial feed here when we use the test server.
|
|
|
// Firefox complains on load the initial feed here when we use the test server.
|
|
|
// It may be similar to the CORS problem below.
|
|
|
// It may be similar to the CORS problem below.
|
|
|
await page.locator('li').filter({ hasText: finalTitle }).locator('a').click(); |
|
|
await page.locator('li').filter({ hasText: finalTitle }).getByTestId('circle-info-link').click(); |
|
|
await expect(page.getByRole('heading', { name: 'Verifiable Claim Details' })).toBeVisible(); |
|
|
await expect(page.getByRole('heading', { name: 'Verifiable Claim Details' })).toBeVisible(); |
|
|
await expect(page.getByText(finalTitle, { exact: true })).toBeVisible(); |
|
|
await expect(page.getByText(finalTitle, { exact: true })).toBeVisible(); |
|
|
|
|
|
|
|
@ -154,7 +155,7 @@ test('Add contact, record gift, confirm gift', async ({ page }) => { |
|
|
// Go to home view and look for gift
|
|
|
// Go to home view and look for gift
|
|
|
await page.goto('./'); |
|
|
await page.goto('./'); |
|
|
await page.getByTestId('closeOnboardingAndFinish').click(); |
|
|
await page.getByTestId('closeOnboardingAndFinish').click(); |
|
|
const giftLink = page.locator('li').filter({ hasText: finalTitle }).locator('a'); |
|
|
const giftLink = page.locator('li').filter({ hasText: finalTitle }).getByTestId('circle-info-link').first(); |
|
|
await expect(giftLink).toBeVisible(); |
|
|
await expect(giftLink).toBeVisible(); |
|
|
await giftLink.click(); |
|
|
await giftLink.click(); |
|
|
|
|
|
|
|
@ -226,7 +227,7 @@ test('Add contact, copy details, delete, and import from paste & from file', asy |
|
|
// See a different clipboard solution below.
|
|
|
// See a different clipboard solution below.
|
|
|
|
|
|
|
|
|
// see contact details on the second contact
|
|
|
// see contact details on the second contact
|
|
|
await page.getByTestId('contactListItem').nth(1).locator('a').click(); |
|
|
await page.getByTestId('contactListItem').nth(1).locator(`h2 a)`).click(); |
|
|
await page.getByRole('heading', { name: 'Identifier Details' }).isVisible(); |
|
|
await page.getByRole('heading', { name: 'Identifier Details' }).isVisible(); |
|
|
// remove contact
|
|
|
// remove contact
|
|
|
await page.locator('button > svg.fa-trash-can').click(); |
|
|
await page.locator('button > svg.fa-trash-can').click(); |
|
|