2021-01-03 15:21:36 +00:00
|
|
|
interface LoginOptions {
|
|
|
|
asAdmin: boolean
|
|
|
|
useiTunes: boolean
|
|
|
|
useYouTube: boolean
|
|
|
|
useLastfm: boolean
|
|
|
|
allowDownload: boolean
|
|
|
|
supportsTranscoding: false
|
|
|
|
}
|
|
|
|
|
2020-12-30 10:11:59 +00:00
|
|
|
declare namespace Cypress {
|
|
|
|
interface Chainable {
|
2021-01-03 15:21:36 +00:00
|
|
|
$login(options?: Partial<LoginOptions>): Chainable<AUTWindow>
|
|
|
|
$loginAsNonAdmin(options?: Partial<LoginOptions>): Chainable<AUTWindow>
|
2021-01-04 18:10:12 +00:00
|
|
|
$each(dataset: Array<Array<any>>, callback: (...args) => void): void
|
2020-12-30 22:37:41 +00:00
|
|
|
$confirm(): void
|
2021-01-01 13:31:53 +00:00
|
|
|
$clickSidebarItem(sidebarItemText: string): Chainable<JQuery>
|
2020-12-31 19:01:09 +00:00
|
|
|
|
2021-01-01 19:53:58 +00:00
|
|
|
/**
|
|
|
|
* Mock audio playback, including intercepting the media request, album thumbnail, media info etc.
|
|
|
|
*/
|
|
|
|
$mockPlayback(): void
|
|
|
|
|
2021-01-02 11:58:46 +00:00
|
|
|
/**
|
|
|
|
* Queue several songs from the All Song screen.
|
|
|
|
* @param count
|
|
|
|
*/
|
2021-01-04 18:10:12 +00:00
|
|
|
$shuffleSeveralSongs(count?: number): void
|
2021-01-02 11:58:46 +00:00
|
|
|
|
|
|
|
$assertPlaylistSongCount(name: string, count: number): void
|
|
|
|
$assertFavoriteSongCount(count: number): void
|
2021-01-02 15:22:31 +00:00
|
|
|
$selectSongRange(start: number, end: number, scrollBehavior?: scrollBehaviorOptions): Chainable<JQuery>
|
2021-01-02 22:18:55 +00:00
|
|
|
$assertPlaying(): void
|
|
|
|
$assertNotPlaying(): void
|
2021-01-03 16:24:35 +00:00
|
|
|
$assertSidebarItemActive(text: string): void
|
2021-01-02 11:58:46 +00:00
|
|
|
|
2020-12-31 19:01:09 +00:00
|
|
|
/**
|
|
|
|
* 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>>
|
2020-12-30 10:11:59 +00:00
|
|
|
}
|
|
|
|
}
|