@ember/test-helpers
Version:
Helpers for testing Ember.js applications
26 lines (21 loc) • 1.06 kB
TypeScript
import type { Target } from './-target.ts';
/**
Set the `selected` property true for the provided option the target is a
select element (or set the select property true for multiple options if the
multiple attribute is set true on the HTMLSelectElement) then trigger
`change` and `input` events on the specified target.
@public
@param {string|Element|IDOMElementDescriptor} target the element, selector, or descriptor for the select element
@param {string|string[]} options the value/values of the items to select
@param {boolean} keepPreviouslySelected a flag keep any existing selections
@return {Promise<void>} resolves when the application is settled
@example
<caption>
Emulating selecting an option or multiple options using `select`
</caption>
select('select', 'apple');
select('select', ['apple', 'orange']);
select('select', ['apple', 'orange'], true);
*/
export default function select(target: Target, options: string | string[], keepPreviouslySelected?: boolean): Promise<void>;
//# sourceMappingURL=select.d.ts.map