diff --git a/tests/playwright-test/reporter-html.spec.ts b/tests/playwright-test/reporter-html.spec.ts index 48fc384d20..f1e2bb4eda 100644 --- a/tests/playwright-test/reporter-html.spec.ts +++ b/tests/playwright-test/reporter-html.spec.ts @@ -962,9 +962,10 @@ for (const useIntermediateMergeReport of [true, false] as const) { await showReport(); await page.getByRole('link', { name: 'passing' }).click(); - const attachment = page.getByText('attachment', { exact: true }); + const attachment = page.getByTestId('attachments').getByText('attachment', { exact: true }); await expect(attachment).not.toBeInViewport(); - await page.getByLabel('step').getByTitle('link to attachment').click(); + await page.getByLabel('step').click(); + await page.getByTitle('see "attachment"').click(); await expect(attachment).toBeInViewport(); });