@chtsinc/ch-playwright-report
Version:
Custom Playwright Reporter that logs test and execution results to MongoDB
19 lines (18 loc) • 861 B
TypeScript
export interface Annotation {
type: string;
description?: string;
}
/**
* Return the description of the first annotation matching annotationType.
* @param annotations - Playwright’s annotations array (e.g. from TestInfo.annotations)
* @param annotationType - the annotation “type” to look for
* @returns the first matching description, or undefined if none found
*/
export declare function getFirstAnnotationDescription(annotations: Annotation[], annotationType: string): string | undefined;
/**
* Collect all descriptions for annotations of a given type.
* @param annotations - Playwright’s annotations array
* @param annotationType - the annotation “type” to filter by
* @returns an array of non-null descriptions
*/
export declare function getAnnotationDescriptions(annotations: Annotation[], annotationType: string): string[];