diff --git a/src/configuration/types.ts b/src/configuration/types.ts index b3713b046d..c6a5ad9709 100644 --- a/src/configuration/types.ts +++ b/src/configuration/types.ts @@ -31,7 +31,5 @@ interface GlobalHooks { request?: typeof RequestHook[] | typeof RequestHook; } -type CustomActions = { [name: string]: () => void } - // eslint-disable-next-line @typescript-eslint/no-unused-vars type OptionValue = undefined | null | string | boolean | number | string[] | Function | { [key: string]: any } | ScreenshotOptionValue | QuarantineOptionValue | CompilerOptions | GlobalHooks | SkipJsErrorsOptionValue | CustomActions; diff --git a/ts-defs-src/test-api/test-controller.d.ts b/ts-defs-src/test-api/test-controller.d.ts index 9d7a04d909..8532492c7a 100644 --- a/ts-defs-src/test-api/test-controller.d.ts +++ b/ts-defs-src/test-api/test-controller.d.ts @@ -97,6 +97,10 @@ interface WindowFilterData { url: URL; } +interface CustomActions { + [key: string]: (...args: any[]) => TestControllerPromise +} + type ScrollPosition = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft' | 'center'; interface TestController { @@ -112,6 +116,10 @@ interface TestController { * Returns an object that contains browser information. */ readonly browser: Browser; + /** + * Returns an object that contains registered custom actions. + */ + readonly customActions: CustomActions; /** * Dispatches an event over a specified webpage element. *