UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

14 lines (13 loc) 502 B
import { userEvent } from '@storybook/test'; /** * Wrapper to select an option in a react-select component * * @param canvas - The canvas where the input is present. * @param input - The input element associated with the react-select component. * @param optionOrOptions - The option or options to select. */ const rsSelect = async (canvas, input, optionOrOptions) => { await userEvent.click(input); await userEvent.click(await canvas.findByText(optionOrOptions)); }; export { rsSelect };