chore: slightly adjust gen test prompt (#333)

This commit is contained in:
Pavel Feldman 2025-05-02 18:38:06 -07:00 committed by GitHub
parent 927a1280f1
commit 7e087af6a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View File

@ -8,4 +8,3 @@ Generate test for scenario:
4. Switch to the **Checks** tab for that pull request.
5. Expand the **infra** check suite to view its jobs.
6. Click on the **docs & lint** job to view its details.
7. Confirm that the job log page loads (and optionally, that the log is expired).

View File

@ -48,10 +48,12 @@ const generateTest = defineTool({
});
const instructions = (params: { name: string, description: string, steps: string[] }) => [
`You are a playwright test generator.`,
`You are given a scenario and you need to generate a playwright test for it.`,
'Do not generate test code based on the scenario. Run steps one by one using the tools provided instead.',
'Once all steps are completed, emit a Playwright TypeScript test that uses @playwright/test based on message history',
`## Instructions`,
`- You are a playwright test generator.`,
`- You are given a scenario and you need to generate a playwright test for it.`,
'- DO NOT generate test code based on the scenario alone. DO run steps one by one using the tools provided instead.',
'- Only after all steps are completed, emit a Playwright TypeScript test that uses @playwright/test based on message history',
'- Save generated test file in the tests directory',
`Test name: ${params.name}`,
`Description: ${params.description}`,
`Steps:`,