ember-power-select icon indicating copy to clipboard operation
ember-power-select copied to clipboard

Add types for test-support

Open josemarluedke opened this issue 5 years ago • 1 comments

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?

josemarluedke avatar Jan 16 '20 04:01 josemarluedke

@cibernox any updates on this?

RobbieTheWagner avatar Jul 20 '22 16:07 RobbieTheWagner

completed in #1743

mkszepp avatar Mar 15 '24 15:03 mkszepp