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

200 lines (199 loc) 6.11 kB
import * as D from "io-ts/Decoder"; export type ICypressRuntimeConfiguration = Pick<Cypress.PluginConfigOptions, "isTextTerminal" | "testingType" | "projectRoot" | "reporter" | "specPattern" | "excludeSpecPattern" | "env">; declare const FilterSpecsMixedMode: D.Decoder<unknown, "hide" | "show" | "empty-set">; export type IFilterSpecsMixedMode = D.TypeOf<typeof FilterSpecsMixedMode>; declare const EnvironmentOverrides: D.Decoder<unknown, Partial<{ stepDefinitions: string | string[]; stateSoftErrors: boolean | undefined; messagesEnabled: boolean | undefined; messagesOutput: string; jsonEnabled: boolean | undefined; jsonOutput: string; htmlEnabled: boolean | undefined; htmlOutput: string; usageEnabled: boolean | undefined; usageOutput: string; prettyEnabled: boolean | undefined; filterSpecsMixedMode: "hide" | "show" | "empty-set"; filterSpecs: boolean | undefined; omitFiltered: boolean | undefined; dryRun: boolean | undefined; attachmentsAddScreenshots: boolean | undefined; attachmentsAddVideos: boolean | undefined; }>>; type IEnvironmentOverrides = D.TypeOf<typeof EnvironmentOverrides>; declare const BaseConfiguration: D.Decoder<unknown, Partial<{ stepDefinitions: string | string[]; state: Partial<{ softErrors: boolean; }>; messages: Partial<{ enabled: boolean; output: string; }>; json: Partial<{ enabled: boolean; output: string; }>; html: Partial<{ enabled: boolean; output: string; }>; usage: Partial<{ enabled: boolean; output: string; }>; pretty: Partial<{ enabled: boolean; }>; filterSpecsMixedMode: "hide" | "show" | "empty-set"; filterSpecs: boolean; omitFiltered: boolean; dryRun: boolean; attachments: Partial<{ addScreenshots: boolean; addVideos: boolean; }>; }>>; export type IBaseUserConfiguration = D.TypeOf<typeof BaseConfiguration>; declare const UserConfiguration: D.Decoder<unknown, Partial<{ stepDefinitions: string | string[]; state: Partial<{ softErrors: boolean; }>; messages: Partial<{ enabled: boolean; output: string; }>; json: Partial<{ enabled: boolean; output: string; }>; html: Partial<{ enabled: boolean; output: string; }>; usage: Partial<{ enabled: boolean; output: string; }>; pretty: Partial<{ enabled: boolean; }>; filterSpecsMixedMode: "hide" | "show" | "empty-set"; filterSpecs: boolean; omitFiltered: boolean; dryRun: boolean; attachments: Partial<{ addScreenshots: boolean; addVideos: boolean; }>; }> & Partial<{ e2e: Partial<{ stepDefinitions: string | string[]; state: Partial<{ softErrors: boolean; }>; messages: Partial<{ enabled: boolean; output: string; }>; json: Partial<{ enabled: boolean; output: string; }>; html: Partial<{ enabled: boolean; output: string; }>; usage: Partial<{ enabled: boolean; output: string; }>; pretty: Partial<{ enabled: boolean; }>; filterSpecsMixedMode: "hide" | "show" | "empty-set"; filterSpecs: boolean; omitFiltered: boolean; dryRun: boolean; attachments: Partial<{ addScreenshots: boolean; addVideos: boolean; }>; }>; component: Partial<{ stepDefinitions: string | string[]; state: Partial<{ softErrors: boolean; }>; messages: Partial<{ enabled: boolean; output: string; }>; json: Partial<{ enabled: boolean; output: string; }>; html: Partial<{ enabled: boolean; output: string; }>; usage: Partial<{ enabled: boolean; output: string; }>; pretty: Partial<{ enabled: boolean; }>; filterSpecsMixedMode: "hide" | "show" | "empty-set"; filterSpecs: boolean; omitFiltered: boolean; dryRun: boolean; attachments: Partial<{ addScreenshots: boolean; addVideos: boolean; }>; }>; }>>; export type IUserConfiguration = D.TypeOf<typeof UserConfiguration>; export interface IPreprocessorConfiguration { readonly stepDefinitions: string | string[]; readonly state: { softErrors: boolean; }; readonly messages: { enabled: boolean; output: string; }; readonly json: { enabled: boolean; output: string; }; readonly html: { enabled: boolean; output: string; }; readonly usage: { enabled: boolean; output: string; }; readonly pretty: { enabled: boolean; }; readonly filterSpecsMixedMode: D.TypeOf<typeof FilterSpecsMixedMode>; readonly filterSpecs: boolean; readonly omitFiltered: boolean; readonly implicitIntegrationFolder: string; readonly isTrackingState: boolean; readonly dryRun: boolean; readonly attachments: { addScreenshots: boolean; addVideos: boolean; }; } export declare const COMPILED_REPORTER_ENTRYPOINT = "dist/subpath-entrypoints/pretty-reporter.js"; export declare function combineIntoConfiguration(configuration: IUserConfiguration, overrides: IEnvironmentOverrides, cypress: ICypressRuntimeConfiguration, implicitIntegrationFolder: string): IPreprocessorConfiguration; export type ConfigurationFileResolver = (projectRoot: string) => unknown | Promise<unknown>; export declare function resolve(cypressConfig: ICypressRuntimeConfiguration, environment: Record<string, unknown>, implicitIntegrationFolder: string, configurationFileResolver?: ConfigurationFileResolver): Promise<IPreprocessorConfiguration>; export {};