chore: rename prompt button (#34851)

This commit is contained in:
Simon Knott 2025-02-19 23:32:58 +01:00 committed by GitHub
parent f5b8cca1eb
commit 1f1e2acf9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ const PromptButton: React.FC<{
setCopied(false);
}, 3000);
}}>
{copied ? <span className='prompt-button-copied'>Copied <icons.copy/></span> : 'Fix with AI'}
{copied ? <span className='prompt-button-copied'>Copied <icons.copy/></span> : 'Copy as Prompt'}
</button>;
};

View File

@ -70,7 +70,7 @@ const CopyPromptButton: React.FC<{
return (
<CopyToClipboardTextButton
value={prompt}
description='Fix with AI'
description='Copy as Prompt'
copiedDescription={<>Copied <span className='codicon codicon-copy' style={{ marginLeft: '5px' }}/></>}
style={{ width: '90px', justifyContent: 'center' }}
/>

View File

@ -2802,7 +2802,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: 'Fix with AI' }).click();
await page.getByRole('button', { name: 'Copy as Prompt' }).click();
const prompt = await page.evaluate(() => navigator.clipboard.readText());
expect(prompt, 'first line').toContain(`My Playwright test failed, what's going wrong? I've included the error, a code diff and a snapshot of the page below.`);
expect(prompt, 'contains error').toContain('expect(received).toBe(expected)');

View File

@ -514,7 +514,7 @@ test('should show copy prompt button in errors tab', async ({ runUITest }) => {
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();
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)');
});