8000
Skip to content

Repository files navigation

Cypress Generic Component Library

This package provides ready-to-use generic objects and helpers to simplify Cucumber tests for UI and API.

It offers a set of generic components for testing Angular applications using Cypress, including forms, fields, buttons, tables, menus, and graphs. These components can be easily extended and customized for specific testing needs.


Features

  • Generic Components: Reusable and extendable UI components.
  • Component Interactions: Methods for interacting with components, such as clicking, typing, selecting, etc.
  • Customizable Requests: Ability to intercept and handle API requests triggered by component interactions.
  • Assertions and Validations: Built-in assertions to validate the state and behavior of components.
  • Custom Error Messages: Personalized error messages by rewriting error-handling listeners in Cypress.

Generic Testing Implementation

The library integrates the following testing methodologies:

  • Keyword-Driven Testing (KDT): Provides generic functions for actions and assertions.
  • Data-Driven Testing (DDT): Aligns with Cypress concepts such as fixtures.
  • Page Object Model (POM): Generic objects represent web interfaces that can be extended and initialized with data.

Identified generic objects include pages, tables, forms, buttons, inputs, selects, and menus, each with pre-defined actions and assertions.


Installation

Install the Cypress Generic Component Library using npm:

npm version

npm i @yassinouhadi/cypress-generic-package

Usage

The library provides ready-to-use objects that can be extended for your application. Combine with the Step Library or custom POM objects to write efficient BDD-style tests without repetitive boilerplate code.

For detailed examples and implementation, refer to the documentation in the docs/approaches folder.


Documentation


Contributing

Contributions are welcome! To contribute.

For more details, see CONTRIBUTING.md.


Issues

If you find a bug or want to request a feature, please report it on the GitHub Issues page.


Feature Assured VS Code Extension

This library integrates seamlessly with the Feature Assured VS Code extension for managing tests, generating reports, and running automated scripts. Check it out here.


License

This package is licensed under the MIT License.

About

Cypress tests generic pom objects package

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0