add test
This commit is contained in:
parent
988b278c9e
commit
298f92ee7e
|
|
@ -499,3 +499,22 @@ test('skipped steps should have an indicator', async ({ runUITest }) => {
|
|||
await expect(skippedMarker).toBeVisible();
|
||||
await expect(skippedMarker).toHaveAccessibleName('skipped');
|
||||
});
|
||||
|
||||
test('should show copy prompt button in errors tab', async ({ runUITest }) => {
|
||||
const { page } = await runUITest({
|
||||
'a.spec.ts': `
|
||||
import { test, expect } from '@playwright/test';
|
||||
test('fails', async () => {
|
||||
expect(1).toBe(2);
|
||||
});
|
||||
`,
|
||||
});
|
||||
|
||||
await page.getByText('fails').dblclick();
|
||||
|
||||
await page.context().grantPermissions(['clipboard-read', 'clipboard-write']);
|
||||
await page.getByText('Errors', { exact: true }).click();
|
||||
await page.locator('.tab-errors').getByRole('button', { name: 'Fix with AI' }).click();
|
||||
const prompt = await page.evaluate(() => navigator.clipboard.readText());
|
||||
expect(prompt, 'contains error').toContain('expect(received).toBe(expected)');
|
||||
});
|
||||
Loading…
Reference in a new issue