oberconcejo/VS-CODE / .agents/skills/angular-developer
angular-developer
VerifiedGenerates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.
references/e2e-testing.md
View on GitHub# End-to-End (E2E) Testing
Use E2E tests to cover critical user journeys in a real browser. Prefer the framework already configured in the Angular workspace, such as Cypress or Playwright.
## Running E2E Tests
Check `package.json` and `angular.json` for the project-specific command. Common patterns include:
```shell
npm run e2e
pnpm e2e
ng e2e
```
When the app must be built or served first, use the existing project scripts instead of inventing a parallel test entrypoint.
## Test Structure
- Keep E2E specs close to the configured test framework, such as `cypress/e2e/` or `e2e/`.
- Put reusable login/setup helpers in the framework support directory.
- Keep fixtures explicit and small enough that each test can explain the user state it depends on.
### Cypress Example
```typescript
describe('Login flow', () => {
it('redirects to dashboard on valid credentials', () => {
cy.visit('/login');
cy.get('[data-cy=email]').type('user@example.com');
cy.get('[data-cy=password]').type('password123');
cy.get('[data-cy=submit]').click();
cy.url().should('include', '/dashboard');
});
});
```
### Playwright Example
```typescript
import {expect, test} from '@playwright/test';
test('redirects to dashboard on valid credentials', async ({page}) => {
await page.goto('/login');
await page.getByLabel('Email').fill('user@example.com');
await page.getByLabel('Password').fill('password123');
await page.getByRole('button', {name: 'Sign in'}).click();
await expect(page).toHaveURL(/dashboard/);
});
```
## Best Practices
- Prefer accessible locators (`getByRole`, `getByLabel`) or stable `data-*` attributes.
- Avoid selectors that depend on CSS classes, DOM depth, or incidental text.
- Wait for specific UI states, routes, or network responses instead of arbitrary sleeps.
- Keep smoke tests short and reserve full workflow coverage for the highest-value paths.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |