cypress-get-react-component

1.0.0-dev4 • Public • Published

cypress-get-react-component

NPM

Build Status

A plugin for Cypress to .get React components by name or by ECMAScript class.

Currently a work in progress.

Installation

In your repo:

yarn add --dev cypress-get-react-component

In your cypress/support/commands.js:

require('cypress-get-react-component').install();

Usage

See spec.js for more usage examples.

By component name

cy.getReactComponent('FooComponent').then(...)

By component class

const FooComponent = require('../../src/FooComponent.js')
cy.getReactComponent(FooComponent).then(...)

Readme

Keywords

none

Package Sidebar

Install

npm i cypress-get-react-component

Weekly Downloads

0

Version

1.0.0-dev4

License

MIT

Unpacked Size

4.84 kB

Total Files

4

Last publish

Collaborators

  • flotwig