Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: rename prompt button (#34851)
Simon Knott1f1e2acf9b71
diff --git a/packages/html-reporter/src/testErrorView.tsx b/packages/html-reporter/src/testErrorView.tsxindex 11f8e4b474..4f19869833 100644--- a/packages/html-reporter/src/testErrorView.tsx+++ b/packages/html-reporter/src/testErrorView.tsx@@ -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>;};diff --git a/packages/trace-viewer/src/ui/errorsTab.tsx b/packages/trace-viewer/src/ui/errorsTab.tsxindex 6142a0c83e..d7b9ac7eba 100644--- a/packages/trace-viewer/src/ui/errorsTab.tsx+++ b/packages/trace-viewer/src/ui/errorsTab.tsx@@ -70,7 +70,7 @@ const CopyPromptButton: React.FC<{return (<CopyToClipboardTextButtonvalue={prompt}- description='Fix with AI'+ description='Copy as Prompt'copiedDescription={<>Copied <span className='codicon codicon-copy' style={{ marginLeft: '5px' }}/></>}style={{ width: '90px', justifyContent: 'center' }}/>diff --git a/tests/playwright-test/reporter-html.spec.ts b/tests/playwright-test/reporter-html.spec.tsindex 78ef741415..1f6f8c4180 100644--- a/tests/playwright-test/reporter-html.spec.ts+++ b/tests/playwright-test/reporter-html.spec.ts@@ -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)');diff --git a/tests/playwright-test/ui-mode-trace.spec.ts b/tests/playwright-test/ui-mode-trace.spec.tsindex e7479cab1a..61278ce362 100644--- a/tests/playwright-test/ui-mode-trace.spec.ts+++ b/tests/playwright-test/ui-mode-trace.spec.ts@@ -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)');});