From 0d80dc74ec4ed51ade4aafd6003dfa11de6e69e7 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Fri, 18 Jul 2025 16:52:18 +0800 Subject: [PATCH] Update: locators to match changes to homeview --- test-playwright/30-record-gift.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test-playwright/30-record-gift.spec.ts b/test-playwright/30-record-gift.spec.ts index 76084f45..d8ee9698 100644 --- a/test-playwright/30-record-gift.spec.ts +++ b/test-playwright/30-record-gift.spec.ts @@ -100,7 +100,8 @@ test('Record something given', async ({ page }) => { // Record something given await page.goto('./'); await page.getByTestId('closeOnboardingAndFinish').click(); - await page.getByRole('heading', { name: 'Unnamed/Unknown' }).click(); + await page.getByRole('button', { name: 'Person' }).click(); + await page.getByRole('listitem').filter({ hasText: 'Unnamed' }).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(); @@ -109,7 +110,7 @@ test('Record something given', async ({ page }) => { // Refresh home view and check gift await page.goto('./'); - const item = await page.locator('li').filter({ hasText: finalTitle }); + const item = await page.locator('li:first-child').filter({ hasText: finalTitle }); await item.locator('[data-testid="circle-info-link"]').click(); await expect(page.getByRole('heading', { name: 'Verifiable Claim Details' })).toBeVisible(); await expect(page.getByText(finalTitle, { exact: true })).toBeVisible();