Claude
Skills
Sign in
Back

angular-cypress

Included with Lifetime
$97 forever

ALWAYS use when testing Angular applications with Cypress, E2E testing, or component testing in Angular.

Design

What this skill does


# Angular + Cypress

**Version:** Cypress 13.x (2025)
**Tags:** Cypress, E2E, Testing, Component Tests

**References:** [Cypress](https://www.cypress.io/) • [Cypress Angular](https://docs.cypress.io/guides/component-testing/angular/overview)

## Best Practices

- Install Cypress

```bash
npm install -D cypress @cypress/angular cypress-visual-regression
npx cypress open
```

- Write E2E test

```ts
describe('My First Test', () => {
  it('visits the kitchen sink', () => {
    cy.visit('/');
    cy.contains('type').click();
    cy.get('.action-email').type('[email protected]');
    cy.get('.action-email').should('have.value', '[email protected]');
  });
});
```

- Write component test

```ts
import { mount } from 'cypress/angular';
import { ButtonComponent } from './button.component';

describe('ButtonComponent', () => {
  it('renders button with text', () => {
    mount(ButtonComponent, { 
      componentProperties: { 
        label: 'Click me' 
      } 
    });
    cy.get('button').should('contain.text', 'Click me');
  });
});
```

Related in Design