mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-01-06 20:13:54 +05:30
30 lines
574 B
TypeScript
30 lines
574 B
TypeScript
/// <reference types="cypress" />
|
|
|
|
type AccountAlias = 'default' | 'default2';
|
|
|
|
interface Account {
|
|
id: string;
|
|
username: string;
|
|
email: string;
|
|
token: string;
|
|
refreshToken: string;
|
|
}
|
|
|
|
declare namespace Cypress {
|
|
interface Chainable {
|
|
/**
|
|
* Custom command to log in the user
|
|
*
|
|
* @example cy.login(account)
|
|
*/
|
|
login(options: {
|
|
accounts: AccountAlias[];
|
|
}): Promise<{ accounts: Account[] }>;
|
|
|
|
getByTestId<S = any>(
|
|
id: string,
|
|
options?: Partial<Loggable & Timeoutable & Withinable>,
|
|
): Chainable<S>;
|
|
}
|
|
}
|