Skip to content

Commit ef33c83

Browse files
committed
cherry-pick(#35057): chore: rename to copy prompt
1 parent 224385a commit ef33c83

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

docs/src/release-notes-js.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ import LiteYouTube from '@site/src/components/LiteYouTube';
3131

3232
### Copy as prompt
3333

34-
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.
34+
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.
3535

36-
![Copy as Prompt](https://github.com/user-attachments/assets/f3654407-dd6d-4240-9845-0d96df2bf30a)
36+
![Copy prompt](https://github.com/user-attachments/assets/f3654407-dd6d-4240-9845-0d96df2bf30a)
3737

3838
### Filter visible elements
3939

packages/html-reporter/src/testErrorView.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const PromptButton: React.FC<{ prompt: string }> = ({ prompt }) => {
5858
setCopied(false);
5959
}, 3000);
6060
}}>
61-
{copied ? 'Copied' : 'Copy as Prompt'}
61+
{copied ? 'Copied' : 'Copy prompt'}
6262
</button>;
6363
};
6464

packages/trace-viewer/src/ui/errorsTab.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const CopyPromptButton: React.FC<{ prompt: string }> = ({ prompt }) => {
3131
return (
3232
<CopyToClipboardTextButton
3333
value={prompt}
34-
description='Copy as Prompt'
34+
description='Copy prompt'
3535
copiedDescription={<>Copied <span className='codicon codicon-copy' style={{ marginLeft: '5px' }}/></>}
3636
style={{ width: '120px', justifyContent: 'center' }}
3737
/>

tests/playwright-test/reporter-html.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2779,7 +2779,7 @@ for (const useIntermediateMergeReport of [true, false] as const) {
27792779
await page.context().grantPermissions(['clipboard-read', 'clipboard-write']);
27802780

27812781
await page.getByRole('link', { name: 'sample' }).click();
2782-
await page.getByRole('button', { name: 'Copy as Prompt' }).click();
2782+
await page.getByRole('button', { name: 'Copy prompt' }).click();
27832783
const prompt = await page.evaluate(() => navigator.clipboard.readText());
27842784
expect(prompt, 'first line').toContain(`Playwright test failed.`);
27852785
expect(prompt, 'contains error').toContain('expect(received).toBe(expected)');

tests/playwright-test/ui-mode-trace.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ test('fails', async ({ page }) => {
514514

515515
await page.context().grantPermissions(['clipboard-read', 'clipboard-write']);
516516
await page.getByText('Errors', { exact: true }).click();
517-
await page.locator('.tab-errors').getByRole('button', { name: 'Copy as Prompt' }).click();
517+
await page.locator('.tab-errors').getByRole('button', { name: 'Copy prompt' }).click();
518518
const prompt = await page.evaluate(() => navigator.clipboard.readText());
519519
expect(prompt, 'contains error').toContain('expect(received).toBe(expected)');
520520
expect(prompt.replaceAll('\r\n', '\n'), 'contains test sources').toContain(`

0 commit comments

Comments
 (0)