/// /// import { Background, Comment, GherkinDocument, Scenario } from "@cucumber/messages"; import { CucumberOptions } from "../types/plugin"; export declare function containsNativeTest(runResult: CypressCommandLine.CypressRunResult, featureFileExtension?: string): boolean; export declare function getNativeTestIssueKeys(results: CypressCommandLine.CypressRunResult, projectKey: string, featureFileExtension?: string): string[]; /** * Extracts a Jira issue key from a native Cypress test title, based on the provided project key. * * @param title - the test title * @param projectKey - the Jira projectk key * @returns the Jira issue key * @throws if the title contains zero or more than one issue key */ export declare function getNativeTestIssueKey(title: string, projectKey: string): string; export declare function containsCucumberTest(runResult: CypressCommandLine.CypressRunResult, featureFileExtension?: string): boolean; export interface FeatureFileIssueData { tests: FeatureFileIssueDataTest[]; preconditions: FeatureFileIssueDataPrecondition[]; } export interface FeatureFileIssueDataTest { key: string; summary: string; tags: string[]; } export interface FeatureFileIssueDataPrecondition { key: string; summary: string; } export declare function getCucumberIssueData(filePath: string, projectKey: string, isCloudClient: boolean, prefixes?: CucumberOptions["prefixes"]): FeatureFileIssueData; /** * Parses a Gherkin document (feature file) and returns the information contained within. * * @param file - the path to the feature file * @param encoding - the file's encoding * @returns an object containing the data of the feature file * @example * const data = parseFeatureFile("myTetest.feature") * console.log(data.feature.children[0].scenario); // steps, name, ... * @see https://github.com/cucumber/messages/blob/main/javascript/src/messages.ts */ export declare function parseFeatureFile(file: string, encoding?: BufferEncoding): GherkinDocument; export declare function getCucumberScenarioIssueTags(scenario: Scenario, projectKey: string, testPrefix?: string): string[]; export declare function getScenarioTagRegex(projectKey: string, testPrefix?: string): RegExp; /** * Extracts all comments which are relevant for linking a background to precondition issues. * * @param background - the background * @param projectKey - the project key * @param comments - the feature file comments * @returns the relevant comments */ export declare function getCucumberPreconditionIssueComments(background: Background, projectKey: string, comments: readonly Comment[]): string[]; export declare function getCucumberPreconditionIssueTags(background: Background, projectKey: string, comments: readonly string[], preconditionPrefix?: string): string[];