focalboard/webapp/cypress/global.d.ts
Scott Bishel 8b6ebc3b02
Fixes for cypress tests (#2679)
* fixes for cypress tests

* update

* update

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-29 14:45:20 -06:00

35 lines
1.2 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
declare namespace Cypress {
type LoginData = {
username: string
password: string
}
type UserData = LoginData & {
email: string
}
interface Chainable {
apiRegisterUser: (data: UserData, token?: string, failOnError?: boolean) => Chainable
apiLoginUser: (data: LoginData) => Chainable
apiGetMe: () => Chainable<string>
apiChangePassword: (userId: string, oldPassword: string, newPassword: string) => Chainable
apiInitServer: () => Chainable
apiDeleteBoard: (id: string) => Chainable
apiResetBoards: () => Chainable
apiSkipTour: (userID: string) => Chainable
uiCreateNewBoard: (title?: string) => Chainable
uiAddNewGroup: (name?: string) => Chainable
uiAddNewCard: (title?: string, columnIndex?: number) => Chainable
/**
* Create a board on a given menu item.
*
* @param {string} item - one of the template menu options, ex. 'Empty board'
*/
uiCreateBoard: (item: string) => Chainable
uiCreateEmptyBoard: () => Chainable
}
}