DEV Community

mohamed Said Ibrahim
mohamed Said Ibrahim

Posted on • Originally published at Medium

šŸ”„ Supercharge Your Angular E2E Testing with Cypressā€Šā€”ā€ŠIntroducing cypress-angular-commands

šŸ”„ Supercharge Your Angular E2E Testing with Cypressā€Šā€”ā€ŠIntroducing cypress-angular-commands

A game-changing NPM package with 80+ reusable, production-grade Cypress custom commands designed for Angular-based enterprise applications…


šŸ”„ Supercharge Your Angular E2E Testing with Cypressā€Šā€”ā€ŠIntroducing cypress-angular-commands

A game-changing NPM package with 80+ reusable, production-grade Cypress custom commands designed for Angular-based enterprise applications and ERP systems.


āœ… Why You Should ReadĀ This

Angular apps are beautiful, but they’re also notoriously complex to test.

Whether you’re dealing with:

  • 🧾 dynamic forms with cascading dropdowns
  • šŸ“Š tables with filters, search, and conditional rows
  • šŸ›‘ UI components that render on the fly
  • 🧠 flaky async behavior in enterprise workflows

…then this package was built for you.


šŸš€ Meet cypress-angular-commands

A battle-tested collection of professionally structured, fully typed, and plug-and-play Cypress custom commands for testing Angular/PrimeNG/Material UI frontends like a pro.

šŸ“¦ Install now:

npm install cypress-angular-commands
Enter fullscreen mode Exit fullscreen mode

šŸŽÆ What Makes ItĀ Special?

This package isn’t just another utility helperā€Šā€”ā€Šit’s the result of years of experience automating real-world ERP modules across Sales, Finance, HR, and Inventory apps.

Here’s what you get:

āœ… 80+ Cypress custom commands, organized into 14 categories

Ā āœ… šŸ“‚ Auto-install to your cypress/support folder

Ā āœ… 🧠 Professionally named commands that match real-world scenarios

Ā āœ… āš™ļø Zero configurationā€Šā€”ā€Šworks with your existing tests

Ā āœ… šŸš€ TypeScript-ready with stable assertions and custom retries

Supercharge Your Angular E2E Testing withĀ Cypress


šŸ“š Coverage You Can CountĀ On

Here’s just a glimpse of what’s inside:

Coverage You Can CountĀ On


šŸ›  Install and Set Up inĀ Seconds

  1. šŸ“¦ Install via NPM
npm install cypress-angular-commands
Enter fullscreen mode Exit fullscreen mode

2. āš™ļø Add to your project’s scripts

"scripts": {   "install:commands": "node ./node_modules/cypress-angular-commands/scripts/install-commands.js" }
Enter fullscreen mode Exit fullscreen mode

3. šŸš€ Run the command

npm run install:commands
Enter fullscreen mode Exit fullscreen mode

āœ… This will:

  • Copy all command files to cypress/support/angular-commands/
  • Append their import to your support/index.ts
  • Respect your existing setupā€Šā€”ā€Šno overwrites, no conflicts

šŸ” Real Example: Clean, Readable, Robust

// Verify search filters a table  
cy.verifySearchFunctionality('\[data-test="search-input"\]', \[1, 2\]);  

// Extract value from table where another cell matches  
cy.getCellValueWhenCondition(2, 0, 'Approved').then((text) => {  
  expect(text).to.contain('Invoice');  
});  
// Validate placeholder and label text  
cy.verifyLabelText('\[data-test="email-label"\]', 'Email');  
cy.verifyPlaceholder('\[data-test="email-input"\]', 'Enter your email');
Enter fullscreen mode Exit fullscreen mode

šŸ”„ Now you write less test code and test more use cases.


🧪 Built for:

āœ… Cypress 13.x+

Ā āœ… Angular 12+ (PrimeNG, Material, Bootstrap)

Ā āœ… TypeScript or JavaScript Cypress setups

Ā āœ… Enterprise apps, ERP systems, B2B UIs

Ā āœ… Developers and QA teams looking to move fast and stay stable


šŸ’¼ Use Cases in theĀ Wild

  • Large ERP apps with dynamic tables and dropdowns
  • Complex form validations with toggles, checkboxes, and modals
  • List views and grids with asynchronous rendering
  • Workflows that require advanced input and navigation flows
  • Teams who need confidence, speed, and maintainability

šŸ” Safe for ExistingĀ Projects

This package does not overwrite anything.

It:

  • Creates a separate folder support/angular-commands/
  • Appends safe imports to index.ts only if needed
  • Respects your existing files and custom commands

āœ… It extendsā€Šā€”ā€Šnot replacesā€Šā€”ā€Šyour existing Cypress setup.


šŸ‘Øā€šŸ’» About theĀ Author

Mohamed Said

Ā Automation Architect | QA Mentor | Cypress Expert

šŸ”— LinkedIn

Ā šŸ”— GitHub

Ā šŸ”— Medium


šŸ“ˆ You have readĀ about:

  • Cypress Angular custom commands
  • Cypress table testing for PrimeNG
  • Cypress reusable dropdown assertions
  • Cypress ERP test automation
  • Cypress UI automation for Angular
  • Cypress custom utilities for complex apps

ā¤ļø FinalĀ Words

If you’re tired of flaky Cypress tests or wasting time writing the same table and form logic again and againā€Šā€”ā€Šinstall this package and let it do the heavy lifting for you.

āœ… Faster tests

Ā āœ… Cleaner specs

Ā āœ… More time to focus on what matters


šŸ“¦ Install now:

npm install cypress-angular-commands  
npm run install:commands
Enter fullscreen mode Exit fullscreen mode

ā­ļø Star it, share it, and tell your QA teamā€Šā€”ā€Šit’s time to automate smarter.

By Mohamed Said Ibrahim on June 20, 2025.

Exported from Medium on October 2, 2025.

Top comments (0)