diff --git a/.github/prompts/playwright-generate-test.prompt.md b/.github/prompts/playwright-generate-test.prompt.md new file mode 100644 index 0000000..65a6f99 --- /dev/null +++ b/.github/prompts/playwright-generate-test.prompt.md @@ -0,0 +1,19 @@ +--- +mode: agent +description: 'Generate a Playwright test based on a scenario using Playwright MCP' +tools: ['changes', 'codebase', 'editFiles', 'fetch', 'findTestFiles', 'problems', 'runCommands', 'runTasks', 'runTests', 'search', 'searchResults', 'terminalLastCommand', 'terminalSelection', 'testFailure', 'playwright'] +model: 'Claude Sonnet 4' +--- + +# Test Generation with Playwright MCP + +Your goal is to generate a Playwright test based on the provided scenario after completing all prescribed steps. + +## Specific Instructions + +- You are given a scenario, and you need to generate a playwright test for it. If the user does not provide a scenario, you will ask them to provide one. +- DO NOT generate test code prematurely or based solely on the scenario without completing all prescribed steps. +- DO run steps one by one using the tools provided by the Playwright MCP. +- 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 +- Execute the test file and iterate until the test passes diff --git a/apply-config.js b/apply-config.js index b1e5c65..9000d35 100755 --- a/apply-config.js +++ b/apply-config.js @@ -101,25 +101,10 @@ async function applyConfig(configPath = "awesome-copilot.config.yml") { }; // Import config manager for effective state computation - const { computeEffectiveItemStates } = require("./config-manager"); + const { getEffectivelyEnabledItems } = require("./config-manager"); - // Compute effective states using precedence rules - const effectiveStates = computeEffectiveItemStates(config); - - // Create sets of effectively enabled items for performance - const effectivelyEnabledSets = { - prompts: new Set(), - instructions: new Set(), - chatmodes: new Set() - }; - - for (const section of ["prompts", "instructions", "chatmodes"]) { - for (const [itemName, state] of Object.entries(effectiveStates[section])) { - if (state.enabled) { - effectivelyEnabledSets[section].add(itemName); - } - } - } + // Get precomputed sets of effectively enabled items for O(1) performance + const effectivelyEnabledSets = getEffectivelyEnabledItems(config); // Count enabled collections for summary if (config.collections) {