From a910399cade693b8884ea843c80e2a7455855c85 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 15 Feb 2026 13:40:55 -0700 Subject: [PATCH] fix test for new item in feed --- test-playwright/30-record-gift.spec.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test-playwright/30-record-gift.spec.ts b/test-playwright/30-record-gift.spec.ts index 90af649c12..4c684502b0 100644 --- a/test-playwright/30-record-gift.spec.ts +++ b/test-playwright/30-record-gift.spec.ts @@ -106,9 +106,9 @@ test('Record something given', async ({ page }) => { await page.waitForFunction(() => { return !document.querySelector('.dialog-overlay'); }, { timeout: 5000 }); - + await page.getByRole('button', { name: 'Thank' }).click(); - await page.getByRole('listitem').filter({ hasText: UNNAMED_ENTITY_NAME }).locator('svg').click(); + await page.getByRole('listitem').filter({ hasText: UNNAMED_ENTITY_NAME }).locator('svg').click(); await page.getByPlaceholder('What was given').fill(finalTitle); await page.getByRole('spinbutton').fill(randomNonZeroNumber.toString()); await page.getByRole('button', { name: 'Sign & Send' }).click(); @@ -130,8 +130,9 @@ test('Record something given', async ({ page }) => { // Verify the gift we just recorded appears in the activity feed await expect(page.getByText(finalTitle, { exact: false })).toBeVisible(); - // Click the specific gift item - const item = page.locator('li:first-child').filter({ hasText: finalTitle }); + // Click the specific gift item (find by title - don't assume first-child, + // since parallel tests or shared DB can add newer items above ours) + const item = page.locator('ul#listLatestActivity li').filter({ hasText: finalTitle }); await retryClick(page, item.locator('[data-testid="circle-info-link"]')); await expect(page.getByRole('heading', { name: 'Verifiable Claim Details' })).toBeVisible(); // Verify we're viewing the specific gift we recorded