koel/cypress/types.d.ts

37 lines
1.2 KiB
TypeScript
Raw Normal View History

declare namespace Cypress {
interface Chainable {
2021-01-01 13:31:53 +00:00
$login(redirectTo?: string): Chainable<AUTWindow>
$loginAsNonAdmin(redirectTo?: string): Chainable<AUTWindow>
2020-12-30 18:44:47 +00:00
$each(dataset: Array<Array<any>>, callback: Function): void
2020-12-30 22:37:41 +00:00
$confirm(): void
2021-01-01 13:31:53 +00:00
$clickSidebarItem(sidebarItemText: string): Chainable<JQuery>
2021-01-01 19:53:58 +00:00
/**
* Mock audio playback, including intercepting the media request, album thumbnail, media info etc.
*/
$mockPlayback(): void
/**
* Queue several songs from the All Song screen.
* @param count
*/
$queueSeveralSongs(count?: number): void
$assertPlaylistSongCount(name: string, count: number): void
$assertFavoriteSongCount(count: number): void
/**
* Support finding an element within an element identified with a test ID.
* For example, given a DOM like this:
* <form data-testid="my-form">
* <input name="email">
* </form>
* then the input can be accessed with:
* cy.$findInTestId('my-form input[name=email]')
* which is identical to
* cy.findByTestId('my-form').find('input[name=email]')
*/
$findInTestId<E extends Node = HTMLElement>(selector: string): Chainable<JQuery<E>>
}
}