@argos-ci/cypress
Version:
Cypress SDK for visual testing with Argos.
28 lines (27 loc) • 1.11 kB
text/typescript
import { UploadParameters } from "@argos-ci/core";
//#region src/task.d.ts
type RegisterArgosTaskOptions = Omit<UploadParameters, "files" | "root" | "metadata"> & {
/**
* Upload the report to Argos.
* @default true
*/
uploadToArgos?: boolean;
};
/**
* Cypress "after:screenshot" event handler.
* - Move screenshots to Argos directory
*/
declare function argosAfterScreenshot(config: Cypress.PluginConfigOptions, details: Cypress.ScreenshotDetails, options?: RegisterArgosTaskOptions): Promise<{
path: any;
}>;
/**
* Cypress "after:run" event handler.
* - Upload screenshots to Argos
*/
declare function argosAfterRun(_config: Cypress.PluginConfigOptions, results: CypressCommandLine.CypressRunResult | CypressCommandLine.CypressFailedRunResult, options?: RegisterArgosTaskOptions): Promise<void>;
/**
* Register the Argos tasks for Cypress.
*/
declare function registerArgosTask(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions, options?: RegisterArgosTaskOptions): void;
//#endregion
export { RegisterArgosTaskOptions, argosAfterRun, argosAfterScreenshot, registerArgosTask };