fix a check for user's registration status

This commit is contained in:
2025-02-16 21:00:52 -07:00
parent e27aefc19e
commit 362dbf523c
2 changed files with 3 additions and 4 deletions

View File

@@ -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

View File

@@ -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;
}