chore: rename to copy prompt (#35057)
This commit is contained in:
parent
43a09e827a
commit
1423d0f8a7
|
@ -31,9 +31,9 @@ import LiteYouTube from '@site/src/components/LiteYouTube';
|
|||
|
||||
### Copy as prompt
|
||||
|
||||
New "Copy as Prompt" button on errors in the HTML report, trace viewer and UI mode. Click to copy a pre-filled LLM prompt that contains the error message and useful context for fixing the error.
|
||||
New "Copy prompt" button on errors in the HTML report, trace viewer and UI mode. Click to copy a pre-filled LLM prompt that contains the error message and useful context for fixing the error.
|
||||
|
||||

|
||||

|
||||
|
||||
### Filter visible elements
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ const PromptButton: React.FC<{ prompt: string }> = ({ prompt }) => {
|
|||
setCopied(false);
|
||||
}, 3000);
|
||||
}}>
|
||||
{copied ? 'Copied' : 'Copy as Prompt'}
|
||||
{copied ? 'Copied' : 'Copy prompt'}
|
||||
</button>;
|
||||
};
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ const CopyPromptButton: React.FC<{ prompt: string }> = ({ prompt }) => {
|
|||
return (
|
||||
<CopyToClipboardTextButton
|
||||
value={prompt}
|
||||
description='Copy as Prompt'
|
||||
description='Copy prompt'
|
||||
copiedDescription={<>Copied <span className='codicon codicon-copy' style={{ marginLeft: '5px' }}/></>}
|
||||
style={{ width: '120px', justifyContent: 'center' }}
|
||||
/>
|
||||
|
|
|
@ -2779,7 +2779,7 @@ for (const useIntermediateMergeReport of [true, false] as const) {
|
|||
await page.context().grantPermissions(['clipboard-read', 'clipboard-write']);
|
||||
|
||||
await page.getByRole('link', { name: 'sample' }).click();
|
||||
await page.getByRole('button', { name: 'Copy as Prompt' }).click();
|
||||
await page.getByRole('button', { name: 'Copy prompt' }).click();
|
||||
const prompt = await page.evaluate(() => navigator.clipboard.readText());
|
||||
expect(prompt, 'first line').toContain(`Playwright test failed.`);
|
||||
expect(prompt, 'contains error').toContain('expect(received).toBe(expected)');
|
||||
|
|
|
@ -514,7 +514,7 @@ test('fails', async ({ page }) => {
|
|||
|
||||
await page.context().grantPermissions(['clipboard-read', 'clipboard-write']);
|
||||
await page.getByText('Errors', { exact: true }).click();
|
||||
await page.locator('.tab-errors').getByRole('button', { name: 'Copy as Prompt' }).click();
|
||||
await page.locator('.tab-errors').getByRole('button', { name: 'Copy prompt' }).click();
|
||||
const prompt = await page.evaluate(() => navigator.clipboard.readText());
|
||||
expect(prompt, 'contains error').toContain('expect(received).toBe(expected)');
|
||||
expect(prompt.replaceAll('\r\n', '\n'), 'contains test sources').toContain(`
|
||||
|
|
Loading…
Reference in New Issue