UNPKG

@badeball/cypress-cucumber-preprocessor

Version:

[![Build status](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml/badge.svg)](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml) [![Npm package weekly downloads](https://badgen.net/n

41 lines (40 loc) 4.18 kB
import DataTable from "./data_table"; import { ICaseHookBody, ICaseHookOptions, IParameterTypeDefinition, IRunHookBody, IRunHookOptions, IStepDefinitionBody, IStepHookBody, IStepHookOptions } from "./public-member-types"; import { ConfigurationFileResolver, ICypressRuntimeConfiguration, IPreprocessorConfiguration } from "./preprocessor-configuration"; import { AddOptions } from "./add-cucumber-preprocessor-plugin"; declare function defineStep<T extends unknown[], C extends Mocha.Context>(description: string | RegExp, implementation: IStepDefinitionBody<T, C>): void; declare function runStepDefinition(world: Mocha.Context, text: string, argument?: DataTable | string): void; declare function defineParameterType<T, C extends Mocha.Context>(options: IParameterTypeDefinition<T, C>): void; declare function defineBefore<C extends Mocha.Context>(options: string, fn: ICaseHookBody<C>): void; declare function defineBefore<C extends Mocha.Context>(options: ICaseHookOptions, fn: ICaseHookBody<C>): void; declare function defineBefore<C extends Mocha.Context>(fn: ICaseHookBody<C>): void; declare function defineAfter<C extends Mocha.Context>(options: string, fn: ICaseHookBody<C>): void; declare function defineAfter<C extends Mocha.Context>(options: ICaseHookOptions, fn: ICaseHookBody<C>): void; declare function defineAfter<C extends Mocha.Context>(fn: ICaseHookBody<C>): void; declare function defineBeforeStep<C extends Mocha.Context>(options: string, fn: IStepHookBody<C>): void; declare function defineBeforeStep<C extends Mocha.Context>(options: IStepHookOptions, fn: IStepHookBody<C>): void; declare function defineBeforeStep<C extends Mocha.Context>(fn: IStepHookBody<C>): void; declare function defineAfterStep<C extends Mocha.Context>(options: string, fn: IStepHookBody<C>): void; declare function defineAfterStep<C extends Mocha.Context>(options: IStepHookOptions, fn: IStepHookBody<C>): void; declare function defineAfterStep<C extends Mocha.Context>(fn: IStepHookBody<C>): void; declare function defineBeforeAll<C extends Mocha.Context>(options: IRunHookOptions, fn: IRunHookBody<C>): void; declare function defineBeforeAll<C extends Mocha.Context>(fn: IRunHookBody<C>): void; declare function defineAfterAll<C extends Mocha.Context>(options: IRunHookOptions, fn: IRunHookBody<C>): void; declare function defineAfterAll<C extends Mocha.Context>(fn: IRunHookBody<C>): void; export declare function attach(data: string | ArrayBuffer, mediaTypeOrOptions?: string | { mediaType: string; fileName?: string; }): void; export declare function log(text: string): void; export declare function link(text: string): void; declare function isFeature(): boolean; declare function doesFeatureMatch(expression: string): boolean; export { DataTable, isFeature, doesFeatureMatch, defineStep as Given, defineStep as When, defineStep as Then, defineStep, runStepDefinition as Step, defineParameterType, defineBefore as Before, defineAfter as After, defineBeforeStep as BeforeStep, defineAfterStep as AfterStep, defineBeforeAll as BeforeAll, defineAfterAll as AfterAll, }; export { IPreprocessorConfiguration }; export declare function resolvePreprocessorConfiguration(cypressConfig: ICypressRuntimeConfiguration, environment: Record<string, unknown>, implicitIntegrationFolder: string, configurationFileResolver?: ConfigurationFileResolver): Promise<IPreprocessorConfiguration>; export declare function addCucumberPreprocessorPlugin(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions, options?: AddOptions): Promise<Cypress.PluginConfigOptions>; export declare function beforeRunHandler(config: Cypress.PluginConfigOptions): Promise<void>; export declare function afterRunHandler(config: Cypress.PluginConfigOptions): Promise<void>; export declare function beforeSpecHandler(config: Cypress.PluginConfigOptions, spec: Cypress.Spec): Promise<void>; export declare function afterSpecHandler(config: Cypress.PluginConfigOptions, spec: Cypress.Spec, results: CypressCommandLine.RunResult): Promise<void>; export declare function afterScreenshotHandler(config: Cypress.PluginConfigOptions, details: Cypress.ScreenshotDetails): Promise<Cypress.ScreenshotDetails>;