import { Test } from "./test"; import { Suite } from "./suite"; import { Hook } from "./hook"; export type TestObjectData = { title: string; }; export type Location = { line: number; column: number; }; export type ConfigurableTestObjectData = { id: string; pending: boolean; timeout: number; file: string; disabled: boolean; skipReason: string; silentSkip: boolean; browserId: string; browserVersion?: string; location?: Location; }; export interface TestFunctionCtx { browser: WebdriverIO.Browser; currentTest: Test; } export type TestFunction = (this: TestFunctionCtx, ctx: T) => void | Promise; export interface TestHookDefinition { = TestFunctionCtx>(fn?: TestFunction): Hook; } export type DefinitionParams = { tag?: string | string[]; }; export interface TestDefinition { = TestFunctionCtx>(title: string, fn?: TestFunction): Test; = TestFunctionCtx>(title: string, params: DefinitionParams, fn?: TestFunction): Test; only: = TestFunctionCtx>(title: string, fn?: TestFunction) => Test; skip: = TestFunctionCtx>(title: string, fn?: TestFunction) => Test; } export interface SuiteDefinition { (title: string, fn: (this: Suite) => void): Suite; (title: string, params: DefinitionParams, fn: (this: Suite) => void): Suite; only: (title: string, fn: (this: Suite) => void) => Suite; skip: (title: string, fn: (this: Suite) => void) => Suite; } export type TestTag = { title: string; dynamic?: boolean; };