npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cy-e2e-kit

v1.0.0

Published

An advanced Cypress library setup.

Readme

🚀 cy-e2e-kit

Reusable, modular Cypress E2E automation framework for Angular, React, Vue, and any modern frontend apps.
Designed for scalability, maintainability, and team-wide consistency using Page Object and Flow Object patterns.


📦 Features

  • ✅ Page Object Model (POM) structure
  • ✅ Reusable business workflows (SOM / Flow Model)
  • ✅ Custom Cypress commands
  • ✅ Utility functions (dates, test data, API setup)
  • ✅ Modular and scalable folder layout
  • ✅ TypeScript support
  • ✅ Works across Angular, React, Vue projects
  • ✅ Ideal for CI pipelines and test libraries

📁 Folder Structure

cy-e2e-kit/
│
├── cypress/
│   ├── downloads/                # For downloaded files
│   ├── fixtures/                 # Test data (optional)
│   ├── types/                    # TS interfaces/types (optional)
│
│   ├── e2e/                      # Test files
│   │   ├── authentication/
│   │   │   └── loginPage.cy.ts
│   │   └── dashboard/
│   │       └── dashboardPage.cy.ts
│
│   ├── pages/                    # Page Objects (POM)
│   │   ├── authentication/
│   │   │   └── LoginPage.ts
│   │   └── dashboard/
│   │       └── DashboardPage.ts
│
│   ├── flows/                    # Business flows (SOM)
│   │   ├── authentication/
│   │   │   └── LoginFlow.ts
│   │   └── dashboard/
│   │       └── DashboardFlow.ts
│
│   ├── support/
│   │   ├── commands/             # Split command files (optional)
│   │   │   └── loginCommands.ts
│   │   ├── utils/                # Modular utility files
│   │   │   └── dateUtils.ts
│   │   ├── commands.ts
│   │   ├── e2e.ts
│   │   └── index.ts
│
│   ├── tsconfig.json
│   └── cypress.config.ts
│
├── node_modules/
├── package.json
├── package-lock.json
└── README.md

🔧 Installation

Install from npm:

npm install cy-e2e-kit --save-dev

or with yarn:

yarn add cy-e2e-kit --dev

⚙️ Compatibility

| Tool | Version | |------|---------| | Cypress | v13+ | | TypeScript | v5.x | | Node.js | 18+ |


📥 Setup in Your Cypress Project

Step 1: Register Custom Commands

In cypress/support/e2e.ts:

import 'cy-e2e-kit/commands'

Step 2: Use a Page Object (POM)

import { LoginPage } from 'cy-e2e-kit/pages'

const loginPage = new LoginPage()

loginPage.visit()
loginPage.enterUsername('admin')
loginPage.enterPassword('password')
loginPage.clickLogin()

Step 3: Use a Flow (SOM)

import { LoginFlow } from 'cy-e2e-kit/flows'

LoginFlow.loginAndNavigateToDashboard('admin', 'password')

Step 4: Use Utility Functions

import { getTodayDate, randomEmail } from 'cy-e2e-kit/utils'

const today = getTodayDate()
const email = randomEmail()

🧪 Example Test Case

import { DashboardPage } from 'cy-e2e-kit/pages'
import { LoginFlow } from 'cy-e2e-kit/flows'

describe('Login & Dashboard Flow', () => {
  const dashboard = new DashboardPage()

  it('should login and show welcome message', () => {
    LoginFlow.loginAndNavigateToDashboard('admin', 'admin123')
    dashboard.getWelcomeMessage().should('contain', 'Welcome, Admin')
  })
})

🧰 Utility Highlights

| Utility | Description | |--------|-------------| | getTodayDate() | Returns today’s date in YYYY-MM-DD | | randomEmail() | Generates a unique test email | | deleteTestUser() | Deletes test data via API |


🧙 Custom Commands

| Command | Usage | |--------|-------| | cy.login(username, password) | Logs in via UI | | cy.logout() | Logs out current user | | cy.clearSession() | Clears session/token | | cy.selectDropdown(label, value) | Selects from dropdown by label | | cy.clickByLabel(label) | Clicks element based on its label text |


🧱 Exported Modules

Use top-level exports:

import {
  LoginPage,
  DashboardPage,
  LoginFlow,
  getTodayDate,
  randomEmail
} from 'cy-e2e-kit'

❓ Why Use cy-e2e-kit?

  • ⏱️ Faster E2E development for large apps
  • 🔐 Stable selector strategies (data-cy driven)
  • 🧼 Clear test architecture (POM + SOM)
  • 🧪 Pluggable across multiple frontend frameworks
  • 👨‍💻 Easy for teams to extend, maintain, and onboard

🏗️ Roadmap

  • [ ] GitHub Actions CI sample integration
  • [ ] Visual testing plugin support (Percy, Applitools)
  • [ ] PDF/CSV download assertions
  • [ ] Local test data seeder
  • [ ] Cucumber BDD support

🤝 Contributing

Contributions welcome! To develop locally:

git clone https://github.com/jayasankardeepam/cy-e2e-kit.git
cd cy-e2e-kit
npm install
npm run build

Submit issues or pull requests for bugs, enhancements, or new modules.


🪪 License

MIT © Your Name or Organization


📬 Contact

Maintained by @jayasankardeepam Feel free to raise issues or reach out for help.