Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve fix test prompt #34709

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Feb 10, 2025

After playing around, this is a prompt I had good results with.

@Skn0tt Skn0tt requested a review from pavelfeldman February 10, 2025 15:02
@Skn0tt Skn0tt self-assigned this Feb 10, 2025
Copy link
Contributor

Test results for "tests 1"

2 failed
❌ [playwright-test] › tests/runner.spec.ts:118:5 › should ignore subprocess creation error because of SIGINT @macos-latest-node18-1
❌ [webkit-library] › tests/library/inspector/title.spec.ts:35:5 › should update primary page URL when original primary closes @webkit-ubuntu-22.04-node18

7 flaky ⚠️ [firefox-page] › tests/page/page-evaluate.spec.ts:403:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18
⚠️ [chromium-library] › tests/library/inspector/cli-codegen-1.spec.ts:23:7 › cli codegen › should click @ubuntu-20.04-chromium-tip-of-tree
⚠️ [webkit-library] › tests/library/browsercontext-clearcookies.spec.ts:116:3 › should remove cookies by path @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › tests/page/page-leaks.spec.ts:82:5 › click should not leak @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › tests/page/page-leaks.spec.ts:107:5 › fill should not leak @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › tests/page/page-leaks.spec.ts:161:5 › waitFor should not leak @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › tests/page/page-set-input-files.spec.ts:205:3 › should upload multiple large files @webkit-ubuntu-22.04-node18

37836 passed, 654 skipped
✔️✔️✔️

Merge workflow run.

@@ -21,25 +21,33 @@ function stripAnsiEscapes(str: string): string {

export function fixTestPrompt(error: string, diff?: string, pageSnapshot?: string) {
const promptParts = [
'This test failed, suggest how to fix it. Please be correct, concise and keep Playwright best practices in mind.',
`My Playwright test failed. What's going wrong?`,
`Please give me a suggestion how to fix it, and then explain what went wrong. Be very concise and apply Playwright best practices.`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about the explain part, personally I'd like to see a fix which I could apply ASAP and only have an explanation on demand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants