Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(agents): copilot description formatting (#38808)

Simon Knottc0a51f8e4333
diff --git a/examples/todomvc/.github/agents/playwright-test-generator.agent.md b/examples/todomvc/.github/agents/playwright-test-generator.agent.md
index b3722976b5..fb15e6efec 100644
--- a/examples/todomvc/.github/agents/playwright-test-generator.agent.md
+++ b/examples/todomvc/.github/agents/playwright-test-generator.agent.md
@@ -1,14 +1,6 @@
---
name: playwright-test-generator
-description: 'Use this agent when you need to create automated browser tests
- using Playwright Examples: <example>Context: User wants to generate a test for
- the test plan item. <test-suite><!-- Verbatim name of the test spec group w/o
- ordinal like "Multiplication tests" --></test-suite> <test-name><!-- Name of
- the test case without the ordinal like "should add two numbers"
- --></test-name> <test-file><!-- Name of the file to save the test into, like
- tests/multiplication/should-add-two-numbers.spec.ts --></test-file>
- <seed-file><!-- Seed file path from test plan --></seed-file> <body><!-- Test
- case content including steps and expectations --></body></example>'
+description: 'Use this agent when you need to create automated browser tests using Playwright Examples: <example>Context: User wants to generate a test for the test plan item. <test-suite><!-- Verbatim name of the test spec group w/o ordinal like "Multiplication tests" --></test-suite> <test-name><!-- Name of the test case without the ordinal like "should add two numbers" --></test-name> <test-file><!-- Name of the file to save the test into, like tests/multiplication/should-add-two-numbers.spec.ts --></test-file> <seed-file><!-- Seed file path from test plan --></seed-file> <body><!-- Test case content including steps and expectations --></body></example>'
tools:
- search
- playwright-test/browser_click
diff --git a/examples/todomvc/.github/agents/playwright-test-planner.agent.md b/examples/todomvc/.github/agents/playwright-test-planner.agent.md
index c10240e2be..1f2e788dab 100644
--- a/examples/todomvc/.github/agents/playwright-test-planner.agent.md
+++ b/examples/todomvc/.github/agents/playwright-test-planner.agent.md
@@ -1,7 +1,6 @@
---
name: playwright-test-planner
-description: Use this agent when you need to create comprehensive test plan for
- a web application or website
+description: Use this agent when you need to create comprehensive test plan for a web application or website
tools:
- search
- playwright-test/browser_click
diff --git a/packages/playwright/src/agents/generateAgents.ts b/packages/playwright/src/agents/generateAgents.ts
index e730654334..3f496893c3 100644
--- a/packages/playwright/src/agents/generateAgents.ts
+++ b/packages/playwright/src/agents/generateAgents.ts
@@ -204,7 +204,7 @@ export class CopilotGenerator {
'mcp-servers': CopilotGenerator.mcpServers,
};
lines.push(`---`);
- lines.push(yaml.stringify(header) + `---`);
+ lines.push(yaml.stringify(header, { lineWidth: 100000 }) + `---`);
lines.push('');
lines.push(agent.instructions);
lines.push('');