# Web Application Testing with Playwright

When creating tests for this project, follow these patterns:

## Test Structure
- Use `describe` blocks for feature groupings
- Use `test` for individual test cases
- Always include setup and teardown

## Assertions
- Prefer `toBeVisible()` over `toHaveCount(1)`
- Use `waitFor` for async operations
- Include accessibility checks

## Example Template
Reference the [test template](./test-template.js) for the standard structure.

## Naming Convention
- Test files: `*.spec.ts`
- Test descriptions: "should [expected behavior] when [condition]"
```

Now when you ask *"Write Playwright tests for the login form"*, Copilot automatically loads this skill and follows your project's testing conventions.

### Loading Skills from Custom Locations

For teams sharing skills across repos, use the new setting:

```json
{
  "chat.agentSkillsLocations": [
    ".github/skills",
    "~/shared-skills",
    "/team/copilot-skills"
  ]
}
```

### Extension-Contributed Skills

Extensions can now contribute skills via their `package.json`:

```json
{
  "contributes": {
    "copilotSkills": [
      {
        "name": "docker-compose",
        "description": "Helps create and debug Docker Compose configurations",
        "path": "./skills/docker-compose"
      }
    ]
  }
}
```

Or dynamically via the new API:

```typescript
vscode.chat.registerSkill({
  name: 'dynamic-skill',
  description: 'A skill registered at runtime',
  async getInstructions(context) {
    // Return context-aware instructions
    return generateInstructionsFor(context.workspace);
  }
});
```

---

## Instruction Files Work Everywhere

Instruction files now apply to **non-coding tasks** like code exploration, architecture explanation, and documentation. [#287152](https://github.com/microsoft/vscode/issues/287152)

**Before:** Your `.github/copilot-instructions.md` was ignored when you asked *"Explain how authentication works in this codebase"*

**After:** Those instructions are now read for all codebase-related work.

This aligns with the <InternalLink slug="stop-bloating-your-claude-md-progressive-disclosure-ai-coding-tools">progressive disclosure approach</InternalLink> where context is loaded on-demand rather than crammed into a single file.

**Example `copilot-instructions.md`:**
```markdown