Browse Source

fix a check for user's registration status

pull/126/head
Trent Larson 5 days ago
parent
commit
886202e4c8
  1. 5
      test-playwright/40-add-contact.spec.ts
  2. 2
      test-playwright/testUtils.ts

5
test-playwright/40-add-contact.spec.ts

@ -92,9 +92,8 @@ test('Add contact, record gift, confirm gift', async ({ page }) => {
await page.goto('./contacts');
await page.getByPlaceholder('URL or DID, Name, Public Key').fill('did:ethr:0x0000694B58C2cC69658993A90D3840C560f2F51F, ' + userName);
await page.locator('button > svg.fa-plus').click();
// This should not be visible because user #1 is not registered, but firefox is getting the logic wrong somehow.
// await expect(page.locator('div[role="alert"] span:has-text("No")')).toBeVisible();
// await page.locator('div[role="alert"] button:has-text("No")').click();
await expect(page.locator('div[role="alert"] span:has-text("No")')).toBeVisible();
await page.locator('div[role="alert"] button:has-text("No")').click();
await expect(page.locator('div[role="alert"] span:has-text("Contact Added")')).toBeVisible();
await page.locator('div[role="alert"] button > svg.fa-xmark').click(); // dismiss info alert
await expect(page.locator('div[role="alert"] button > svg.fa-xmark')).toBeHidden(); // ensure alert is gone

2
test-playwright/testUtils.ts

@ -29,7 +29,7 @@ export async function importUser(page: Page, id?: string): Promise<string> {
// Check DID
await expect(page.getByRole('code')).toContainText(did);
// ... and ensure the app retrieves the registration status
await expect(page.getByText('Your claims counter resets')).toBeVisible();
await expect(page.locator('#sectionUsageLimits').getByText('Checking')).toBeHidden();
return did;
}

Loading…
Cancel
Save