Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cypress-react-selector

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-react-selector - npm Package Compare versions

Comparing version 0.1.8 to 1.0.1

2

index.js

@@ -6,3 +6,3 @@ /**

*/
const waitForReact = (timeout = 10000, reactRoot = '#root') => {
const waitForReact = (timeout = 10000, reactRoot) => {
cy.readFile('node_modules/resq/dist/index.js', 'utf8', { log: false }).then(

@@ -9,0 +9,0 @@ (script) => {

{
"name": "cypress-react-selector",
"version": "0.1.8",
"version": "1.0.1",
"description": "cypress plugin to locate react elements by component, props and state",

@@ -5,0 +5,0 @@ "main": "./index.js",

# cypress-react-selector
[![Build Status](https://circleci.com/gh/abhinaba-ghosh/cypress-react-selector.svg?style=shield&branch-=master)](https://app.circleci.com/pipelines/github/abhinaba-ghosh/cypress-react-selector)
[![NPM release](https://img.shields.io/npm/v/cypress-react-selector.svg 'NPM release')](https://www.npmjs.com/package/cypress-react-selector)
[![PayPal donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ppl.png 'PayPal donation')](https://paypal.me/abhinabaghosh)
_cypress-react-selector_ is a lightweight plugin to help you to locate web elements in your REACT app using components, props and states.. This extension allow you to select page elements in a way that is native to React. This will help you in functional UI tests and E2E tests.
_cypress-react-selector_ is a lightweight plugin to help you to locate web elements in your REACT app using components, props and states. This extension allow you to select page elements in a way that is native to React. This will help you in functional UI tests and E2E tests.

@@ -104,3 +106,3 @@ Internally, cypress-react-selector uses a library called [resq](https://github.com/baruchvlz/resq) to query React's VirtualDOM in order to retrieve the nodes.

this will wait to load react inside your app. By-default it will assume that the react root is set to '#root'. In the example above the id of the root element is set to 'root'. So, you don't need to pass the the root selector
this will wait to load react inside your app. `waitForReact` automatically find out the react root of your application.

@@ -115,3 +117,3 @@ The default timeout for `waitForReact` is `10000` ms. You can specify a custom timeout value:

It is always not true that the root of React app is set to 'root', may be your root element is 'mount', like:
It may even possible that you have different REACT roots (different REACT instances in same application). In this case, you can specify the `CSS Selector` of the target `root`.

@@ -127,3 +129,3 @@ ```js

There is some application which displays react components asynchronously. The cypress-react-selector by-default assumes the react root element is set to 'root', if you have different root element, you need to pass that information to the react selector.
There is some application which displays react components asynchronously. You need to pass `root selector` information to the react selector.

@@ -130,0 +132,0 @@ ```ts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc