From 23335df9a45871aed113c3e08ffdbce54ca4a4bb Mon Sep 17 00:00:00 2001 From: alvaromartmart Date: Wed, 26 Jun 2024 08:12:28 +0200 Subject: [PATCH] test: fix test --- tests/playwright-test/ui-mode-test-attachments.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/playwright-test/ui-mode-test-attachments.spec.ts b/tests/playwright-test/ui-mode-test-attachments.spec.ts index c780734450..33ece90e2a 100644 --- a/tests/playwright-test/ui-mode-test-attachments.spec.ts +++ b/tests/playwright-test/ui-mode-test-attachments.spec.ts @@ -40,8 +40,10 @@ test('should contain text attachment', async ({ runUITest }) => { ]) { await page.getByText(`attach "${name}"`, { exact: true }).click(); const downloadPromise = page.waitForEvent('download'); - if (displayedAsText) + if (displayedAsText){ + await page.locator('.expandable-title', { hasText: name }).locator('.codicon-chevron-right').click(); await expect(page.getByLabel(name)).toContainText(content.split('\n')?.[0]); + } await page.getByRole('link', { name: name }).click(); const download = await downloadPromise; expect(download.suggestedFilename()).toBe(name);