From 22977e0a65e1eee7ea4e7e9aa8e464e60b95f28e Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Mon, 22 Jul 2024 14:36:02 +0200 Subject: [PATCH] repro @dgozman's example --- tests/playwright-test/only-changed.spec.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/playwright-test/only-changed.spec.ts b/tests/playwright-test/only-changed.spec.ts index f40785051b..dec4860199 100644 --- a/tests/playwright-test/only-changed.spec.ts +++ b/tests/playwright-test/only-changed.spec.ts @@ -198,7 +198,7 @@ test('should throw nice error message if git doesnt work', async ({ git, runInli expect(result.output, 'contains git command output').toContain('unknown revision or path not in the working tree'); }); -test('should suppport component tests', async ({ runInlineTest, git, writeFiles }) => { +test.only('should suppport component tests', async ({ runInlineTest, git, writeFiles }) => { await writeFiles({ 'playwright.config.ts': playwrightCtConfigText, 'playwright/index.html': ``, @@ -211,9 +211,12 @@ test('should suppport component tests', async ({ runInlineTest, git, writeFiles import {content} from './contents'; export const Button = () => ; `, + 'src/helper.ts': ` + export { Button } from "./button"; + `, 'src/button.test.tsx': ` import { test, expect } from '@playwright/experimental-ct-react'; - import { Button } from './button'; + import { Button } from './helper'; test('pass', async ({ mount }) => { const component = await mount(); @@ -222,7 +225,7 @@ test('should suppport component tests', async ({ runInlineTest, git, writeFiles `, 'src/button2.test.tsx': ` import { test, expect } from '@playwright/experimental-ct-react'; - import { Button } from './button'; + import { Button } from './helper'; test('pass', async ({ mount }) => { const component = await mount(); @@ -243,7 +246,7 @@ test('should suppport component tests', async ({ runInlineTest, git, writeFiles const result2 = await runInlineTest({ 'src/button2.test.tsx': ` import { test, expect } from '@playwright/experimental-ct-react'; - import { Button } from './button'; + import { Button } from './helper'; test('pass', async ({ mount }) => { const component = await mount();