fix timing error for a click (that only showed in firefox)
This commit is contained in:
@@ -130,11 +130,13 @@ test('Add contact, record gift, confirm gift', async ({ page }) => {
|
||||
|
||||
// Refresh home view and check gift
|
||||
await page.goto('./');
|
||||
// Wait for async data (e.g. "new offers" banner) to finish loading so the layout
|
||||
// is stable before clicking — otherwise a layout shift can redirect the click.
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// Firefox complains on load the initial feed here when we use the test server.
|
||||
// It may be similar to the CORS problem below.
|
||||
const item = await page.locator('li:first-child').filter({ hasText: finalTitle });
|
||||
await item.locator('[data-testid="circle-info-link"]').click();
|
||||
const item = page.locator('li').filter({ hasText: finalTitle }).locator('[data-testid="circle-info-link"]');
|
||||
await expect(item).toBeVisible();
|
||||
await item.click();
|
||||
await expect(page.getByRole('heading', { name: 'Verifiable Claim Details' })).toBeVisible();
|
||||
await expect(page.getByText(finalTitle, { exact: true })).toBeVisible();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user