Git Product home page Git Product logo

cypress-react-admin's Introduction

Cypress React Admin

Cypress React Admin is a testing utility for React applications built with React Admin. It provides a set of custom commands and selectors to simplify the process of writing end-to-end tests for React Admin applications using Cypress.

Features

  • Custom Cypress commands for interacting with React Admin components
  • Selectors of react-admin

Installation

To use Cypress React Admin, you need to have Cypress installed in your project.

# Install Cypress as a dev dependency
npm install cypress --save-dev

# Install Cypress React Admin
npm install cypress-react-admin --save-dev

Setup

  1. Create a cypress directory in the root of your project.
  2. Copy the example test file example.spec.js from cypress-react-admin into the cypress directory.
  3. Modify the test file to suit your application's needs.
  4. Run Cypress using the Cypress test runner.
# Open Cypress test runner
npx cypress open

Usage

Cypress React Admin provides custom commands that you can use in your Cypress tests. These commands simplify the process of interacting with React Admin components and performing common actions.

// Example usage of Cypress React Admin commands
describe('Example test suite', () => {
  it('should expand datagrid', () => {
    cy.expandDatagridRow(1)
    cy.expandDatagridRow(3)
  });
});

For more details on the available commands and usage examples, please refer to the Cypress React Admin documentation.

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.

cypress-react-admin's People

Contributors

ogustavo-pereira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.