Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: windows clipboard contains \r\n (#34966)

Simon Knott44712fb8eb7d
diff --git a/tests/playwright-test/ui-mode-trace.spec.ts b/tests/playwright-test/ui-mode-trace.spec.ts
index e25161f475..13b3713a0e 100644
--- a/tests/playwright-test/ui-mode-trace.spec.ts
+++ b/tests/playwright-test/ui-mode-trace.spec.ts
@@ -517,7 +517,7 @@ test('fails', async () => {
await page.locator('.tab-errors').getByRole('button', { name: 'Copy as Prompt' }).click();
const prompt = await page.evaluate(() => navigator.clipboard.readText());
expect(prompt, 'contains error').toContain('expect(received).toBe(expected)');
- expect(prompt, 'contains codeframe').toContain(`
+ expect(prompt.replaceAll('\r\n', '\n'), 'contains codeframe').toContain(`
1 | import { test, expect } from '@playwright/test';
2 | test('fails', async () => {
> 3 | expect(1).toBe(2);