export type LoginCredentials = { /** * The user email. * Defaults to `Cypress.env('LOGIN_EMAIL') || Cypress.env('LOGIN_USER')`. */ email: string; /** * The user password. * Defaults to `Cypress.env('LOGIN_PASSWORD')`. */ password: string; }; export type LoginCommandTimeouts = { /** * The number of milliseconds to wait for Identity redirect to complete. * Defaults to `1000` (1 second). */ waitForRedirectToLogin?: number; }; export type CommandLoginOptions = { /** * The application entry point URI path. This value is used to identify * the correct application config. */ entryPointUriPath: string; /** * Pass a list of dotfiles that must be loaded when the custom-application-config.json * is loaded (in case you are using environment placeholder). * By default the following dotfiles are loaded: `.env` and `.env.local`. * You can also define the values using paths relative to the application folder. */ dotfiles?: string[]; /** * Called before your page has loaded all of its resources. * Use this as a chance to interact for example with the browser storage. */ onBeforeLoad?: (win: Window) => void; /** * If defined, visit this route after login. */ initialRoute?: string; /** * The project key to access in the user session. The session token is valid for one project key at a time. * Defaults to `Cypress.env('PROJECT_KEY')`. */ projectKey?: string; /** * The user login credentials. */ login?: LoginCredentials; /** * Turn off caching the session across specs. * This is only relevant for Cypress version >= `10.9.0`. */ disableCacheAcrossSpecs?: boolean; /** * Configure timeouts for some of the command interactions. */ timeouts?: LoginCommandTimeouts; }; export type LoginToMerchantCenterForCustomViewCommandLoginOptions = Omit & { /** * The package name as specified in the `package.json` to uniquely identify the configuration. * This is only required for testing Custom Views. * Defaults to `Cypress.env('PACKAGE_NAME')` */ packageName?: string; }; export type CommandLoginByOidcOptions = CommandLoginOptions; declare function loginByForm(commandOptions: CommandLoginOptions): void; export { loginByForm };