From b196223f31fcbb5d2c29a88d700b3ecf3ad8279e Mon Sep 17 00:00:00 2001 From: alvaromartmart Date: Fri, 28 Jun 2024 23:54:17 +0200 Subject: [PATCH] test: fix tests --- tests/playwright-test/ui-mode-test-attachments.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/playwright-test/ui-mode-test-attachments.spec.ts b/tests/playwright-test/ui-mode-test-attachments.spec.ts index 17eec32f31..fa685dd612 100644 --- a/tests/playwright-test/ui-mode-test-attachments.spec.ts +++ b/tests/playwright-test/ui-mode-test-attachments.spec.ts @@ -67,7 +67,7 @@ test('should contain binary attachment', async ({ runUITest }) => { await page.getByText('Attachments').click(); await page.getByText('attach "data"', { exact: true }).click(); const downloadPromise = page.waitForEvent('download'); - await page.getByRole('link', { name: 'data' }).click(); + await page.locator('.expandable-title', { hasText: 'data' }).getByRole('link').click(); const download = await downloadPromise; expect(download.suggestedFilename()).toBe('data'); expect(await readAllFromStream(await download.createReadStream())).toEqual(Buffer.from([1, 2, 3])); @@ -88,7 +88,7 @@ test('should contain string attachment', async ({ runUITest }) => { await page.getByText('Attachments').click(); await page.getByText('attach "note"', { exact: true }).click(); const downloadPromise = page.waitForEvent('download'); - await page.getByRole('link', { name: 'note' }).click(); + await page.locator('.expandable-title', { hasText: 'note' }).getByRole('link').click(); const download = await downloadPromise; expect(download.suggestedFilename()).toBe('note'); expect((await readAllFromStream(await download.createReadStream())).toString()).toEqual('text42');