1import { select } from 'react-select-event';
2
3// Used to select an option or options from a Select in unit tests
4export const selectOptionInTest = async (
5  input: HTMLElement,
6  optionOrOptions: string | RegExp | Array<string | RegExp>
7) => await select(input, optionOrOptions, { container: document.body });
8
9// Finds the parent of the Select so you can assert if it has a value
10export const getSelectParent = (input: HTMLElement) =>
11  input.parentElement?.parentElement?.parentElement?.parentElement?.parentElement;
12