dcf7600ca4
* Addinig initial version of a working template selector * Some improvements * Small improvements in the code * More polishing * Code reorganization * Fixing tests * Fixing linter errors * Allowing to edit/delete templates * Removing no longer needed code reducing race conditions * Fixing some tests * Adding some unit tests * Adding more tests * Splitting a bit more the board template selector for simplification * Moving the delete dialog to the board template selector item * Fixing some tests * Fixing tests * Exctracting i18n strings * Trying to fix part of the cypress tests * Fixing cypress tests * Updating template selector UI * Updating UI * Updating padding * Fixing css linter errors * Fixing css error introduced in the previous commit * Updating snapshots and fixing tests * Fixing cypress tests again * Adressing review comments * Fixing tests Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
32 lines
1.2 KiB
TypeScript
32 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
|
|
apiDeleteBlock: (id: string) => Chainable
|
|
apiResetBoards: () => 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
|
|
}
|
|
}
|