ember-power-select
ember-power-select copied to clipboard
Add types for test-support
It would be nice if Ember Power Select shipped typescript type definition for the test support functions.
Here is what I have been using, but it is not complete:
declare module 'ember-power-select/test-support' {
export function selectChoose(
cssPath: string,
optionTextOrOptionSelector: string,
index?: number
): Promise<void>;
export function selectSearch(
cssPath: string,
searchText: string
): Promise<void>;
export function removeMultipleOption(
cssPath: string,
optionText: string
): Promise<void>;
export function clearSelected(
cssPath: string,
optionText: string
): Promise<void>;
}
declare module 'ember-power-select/test-support/helpers' {
export function clickTrigger(scope?: string): Promise<void>;
export function typeInSearch(text: string): Promise<void>;
export function selectChoose(
cssPath: string,
optionTextOrOptionSelector: string,
index?: number
): Promise<void>;
}
Also, why not combine all these functions in only one file?
@cibernox any updates on this?
completed in #1743