New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-select-event

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-select-event - npm Package Compare versions

Comparing version 4.1.3 to 4.1.4

8

lib/react-select-event.cjs.js

@@ -59,6 +59,10 @@ 'use strict';

const optionElement = await dom.findByText(container, option, {
const matchingElements = await dom.findAllByText(container, option, {
// @ts-ignore invalid rtl types :'(
ignore: "[aria-live] *,[style*='visibility: hidden']"
});
}); // When the target option is already selected, the react-select display text
// will also match the selector. In this case, the actual dropdown element is
// positionned last in the DOM tree.
const optionElement = matchingElements[matchingElements.length - 1];
dom.fireEvent.click(optionElement);

@@ -65,0 +69,0 @@ }

@@ -1,2 +0,2 @@

import { fireEvent, findByText, wait } from '@testing-library/dom';
import { fireEvent, findAllByText, findByText, wait } from '@testing-library/dom';

@@ -55,6 +55,10 @@ /** Simulate user events on react-select dropdowns */

const optionElement = await findByText(container, option, {
const matchingElements = await findAllByText(container, option, {
// @ts-ignore invalid rtl types :'(
ignore: "[aria-live] *,[style*='visibility: hidden']"
});
}); // When the target option is already selected, the react-select display text
// will also match the selector. In this case, the actual dropdown element is
// positionned last in the DOM tree.
const optionElement = matchingElements[matchingElements.length - 1];
fireEvent.click(optionElement);

@@ -61,0 +65,0 @@ }

{
"name": "react-select-event",
"version": "4.1.3",
"version": "4.1.4",
"description": "Simulate react-select events for react-testing-library",

@@ -5,0 +5,0 @@ "main": "lib/react-select-event.cjs.js",

/** Simulate user events on react-select dropdowns */
import { fireEvent, findByText, wait } from "@testing-library/dom";
import {
fireEvent,
findByText,
findAllByText,
wait
} from "@testing-library/dom";

@@ -68,6 +73,11 @@ // find the react-select container from its input field 🤷

// only consider visible, interactive elements
const optionElement = await findByText(container, option, {
const matchingElements = await findAllByText(container, option, {
// @ts-ignore invalid rtl types :'(
ignore: "[aria-live] *,[style*='visibility: hidden']"
});
// When the target option is already selected, the react-select display text
// will also match the selector. In this case, the actual dropdown element is
// positionned last in the DOM tree.
const optionElement = matchingElements[matchingElements.length - 1];
fireEvent.click(optionElement);

@@ -74,0 +84,0 @@ }

Sorry, the diff of this file is not supported yet

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