fix test for new item in feed

This commit is contained in:
2026-02-15 13:40:55 -07:00
parent 0a927ccec5
commit a910399cad

View File

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