2022-11-08 04:21:10 -08:00
|
|
|
// Load type definitions that come with Cypress module
|
|
|
|
/// <reference types="cypress" />
|
|
|
|
|
2023-02-08 12:41:35 -08:00
|
|
|
import { Interception } from 'cypress/types/net-stubbing';
|
|
|
|
|
2022-11-28 09:11:33 -08:00
|
|
|
interface SigninPayload {
|
|
|
|
email: string;
|
|
|
|
password: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface SetupPayload {
|
|
|
|
email: string;
|
|
|
|
password: string;
|
|
|
|
firstName: string;
|
|
|
|
lastName: string;
|
|
|
|
}
|
|
|
|
|
2023-02-08 12:41:35 -08:00
|
|
|
interface SignupPayload extends SetupPayload {
|
|
|
|
url: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface InviteUsersPayload {
|
|
|
|
instanceOwner: SigninPayload;
|
|
|
|
users: SetupPayload[];
|
|
|
|
}
|
|
|
|
|
2022-11-08 04:21:10 -08:00
|
|
|
declare global {
|
|
|
|
namespace Cypress {
|
|
|
|
interface Chainable {
|
2022-12-15 07:39:59 -08:00
|
|
|
getByTestId(
|
|
|
|
selector: string,
|
|
|
|
...args: (Partial<Loggable & Timeoutable & Withinable & Shadow> | undefined)[]
|
|
|
|
): Chainable<JQuery<HTMLElement>>;
|
|
|
|
findChildByTestId(childTestId: string): Chainable<JQuery<HTMLElement>>;
|
2022-11-11 00:07:14 -08:00
|
|
|
createFixtureWorkflow(fixtureKey: string, workflowName: string): void;
|
2022-11-28 09:11:33 -08:00
|
|
|
signin(payload: SigninPayload): void;
|
2023-02-08 12:41:35 -08:00
|
|
|
signout(): void;
|
|
|
|
signup(payload: SignupPayload): void;
|
2022-11-28 09:11:33 -08:00
|
|
|
setup(payload: SetupPayload): void;
|
|
|
|
setupOwner(payload: SetupPayload): void;
|
2023-02-08 12:41:35 -08:00
|
|
|
inviteUsers(payload: InviteUsersPayload): void;
|
|
|
|
interceptREST(method: string, url: string): Chainable<Interception>;
|
2022-11-24 03:52:09 -08:00
|
|
|
skipSetup(): void;
|
2022-11-28 09:11:33 -08:00
|
|
|
resetAll(): void;
|
2023-01-04 00:47:48 -08:00
|
|
|
enableFeature(feature: string): void;
|
2023-03-16 02:19:12 -07:00
|
|
|
waitForLoad(waitForIntercepts?: boolean): void;
|
2022-12-07 09:16:38 -08:00
|
|
|
grantBrowserPermissions(...permissions: string[]): void;
|
|
|
|
readClipboard(): Chainable<string>;
|
2022-12-15 07:39:59 -08:00
|
|
|
paste(pastePayload: string): void;
|
2023-02-06 20:47:37 -08:00
|
|
|
drag(selector: string, target: [number, number]): void;
|
2023-02-09 06:59:01 -08:00
|
|
|
draganddrop(draggableSelector: string, droppableSelector: string): void;
|
2022-11-08 04:21:10 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export {};
|