2021-03-30 19:56:20 +00:00
|
|
|
// load type definitions that come with Cypress module
|
|
|
|
// <reference types="cypress" />
|
|
|
|
|
|
|
|
declare namespace Cypress {
|
|
|
|
interface Chainable {
|
|
|
|
/**
|
|
|
|
* Custom command to setup the testing environment.
|
|
|
|
*/
|
|
|
|
setup(): Chainable<Element>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom command to login the user programmatically using the fleet API.
|
|
|
|
*/
|
2021-06-24 20:42:29 +00:00
|
|
|
login(email?: string, password?: string): Chainable<Element>;
|
2021-03-30 19:56:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom command to log out the current user.
|
|
|
|
*/
|
|
|
|
logout(): Chainable<Element>;
|
|
|
|
|
2021-06-11 21:27:19 +00:00
|
|
|
/**
|
|
|
|
* Custom command to add new queries by default.
|
|
|
|
*/
|
|
|
|
seedQueries(): Chainable<Element>;
|
|
|
|
|
2021-06-09 18:56:59 +00:00
|
|
|
/**
|
|
|
|
* Custom command to add a new user in Fleet (via fleetctl).
|
|
|
|
*/
|
2021-06-24 20:42:29 +00:00
|
|
|
addUser(options?: {
|
|
|
|
email?: string;
|
|
|
|
password?: string;
|
|
|
|
globalRole?: string;
|
|
|
|
}): Chainable<Element>;
|
2021-06-09 18:56:59 +00:00
|
|
|
|
2021-03-30 19:56:20 +00:00
|
|
|
/**
|
|
|
|
* Custom command to setup the SMTP configuration for this testing environment.
|
2021-03-31 12:33:00 +00:00
|
|
|
*
|
|
|
|
* NOTE: login() command is required before this, as it will make authenticated
|
2021-04-05 18:01:30 +00:00
|
|
|
* requests.
|
2021-03-30 19:56:20 +00:00
|
|
|
*/
|
|
|
|
setupSMTP(): Chainable<Element>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom command to set up SSO auth with the local server.
|
2021-04-05 18:01:30 +00:00
|
|
|
*
|
|
|
|
* NOTE: login() command is required before this, as it will make authenticated
|
|
|
|
* requests.
|
2021-03-30 19:56:20 +00:00
|
|
|
*/
|
|
|
|
setupSSO(enable_idp_login?: boolean): Chainable<Element>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom command to login a user1@example.com via SSO.
|
|
|
|
*/
|
|
|
|
loginSSO(): Chainable<Element>;
|
2021-04-29 17:10:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom command to get the emails handled by the Mailhog server.
|
|
|
|
*/
|
|
|
|
getEmails(): Chainable<Response>;
|
2021-06-09 18:56:59 +00:00
|
|
|
|
|
|
|
/**
|
2021-09-03 16:05:23 +00:00
|
|
|
* Custom command to seed the Free tier teams/users.
|
2021-06-09 18:56:59 +00:00
|
|
|
*
|
|
|
|
* NOTE: login() command is required before this, as it will make authenticated
|
|
|
|
* requests.
|
|
|
|
*/
|
2021-09-03 16:05:23 +00:00
|
|
|
seedFree(): Chainable<Element>;
|
2021-06-09 18:56:59 +00:00
|
|
|
|
|
|
|
/**
|
2021-09-03 16:05:23 +00:00
|
|
|
* Custom command to seed the Premium tier teams/users.
|
2021-06-09 18:56:59 +00:00
|
|
|
*
|
|
|
|
* NOTE: login() command is required before this, as it will make authenticated
|
|
|
|
* requests.
|
|
|
|
*/
|
2021-09-03 16:05:23 +00:00
|
|
|
seedPremium(): Chainable<Element>;
|
2021-06-09 18:56:59 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom command to seed the teams/users as represented in Figma.
|
|
|
|
*
|
|
|
|
* NOTE: login() command is required before this, as it will make authenticated
|
|
|
|
* requests.
|
|
|
|
*/
|
|
|
|
seedFigma(): Chainable<Element>;
|
2021-06-15 17:14:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom command to add Docker osquery host.
|
|
|
|
*
|
|
|
|
* NOTE: login() command is required before this, as it will make authenticated
|
|
|
|
* requests.
|
|
|
|
*/
|
|
|
|
addDockerHost(): Chainable;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom command to stop any running Docker hosts.
|
|
|
|
*/
|
|
|
|
stopDockerHost(): Chainable;
|
2021-03-30 19:56:20 +00:00
|
|
|
}
|
|
|
|
}
|