2019-12-07 16:58:52 +05:30
|
|
|
/// <reference types="cypress" />
|
|
|
|
|
2019-12-26 17:48:58 +05:30
|
|
|
type AccountAlias = 'default' | 'default2';
|
|
|
|
|
|
|
|
interface Account {
|
|
|
|
id: string;
|
|
|
|
username: string;
|
|
|
|
email: string;
|
|
|
|
token: string;
|
|
|
|
refreshToken: string;
|
|
|
|
}
|
|
|
|
|
2019-12-07 16:58:52 +05:30
|
|
|
declare namespace Cypress {
|
|
|
|
interface Chainable {
|
|
|
|
/**
|
|
|
|
* Custom command to log in the user
|
|
|
|
*
|
|
|
|
* @example cy.login(account)
|
|
|
|
*/
|
|
|
|
login(options: {
|
2019-12-26 17:48:58 +05:30
|
|
|
accounts: AccountAlias[];
|
|
|
|
}): Promise<{ accounts: Account[] }>;
|
|
|
|
|
|
|
|
getByTestId<S = any>(
|
|
|
|
id: string,
|
|
|
|
options?: Partial<Loggable & Timeoutable & Withinable>,
|
|
|
|
): Chainable<S>;
|
2019-12-07 16:58:52 +05:30
|
|
|
}
|
|
|
|
}
|