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);