import type { TestCase, TestResult, TestStep } from '@playwright/test/reporter'; import type { QAStudioTestResult, QAStudioAttachment, QAStudioReporterOptions, QAStudioTestStep } from './types'; /** * Convert Playwright test result to QAStudio.dev format */ export declare function convertTestResult(test: TestCase, result: TestResult, startTime: Date, options?: QAStudioReporterOptions): QAStudioTestResult; /** * Convert Playwright test step to QAStudio.dev format (recursive for nested steps) * Returns null if step should be filtered out */ export declare function convertTestStep(step: TestStep, filterFixtures?: boolean): QAStudioTestStep | null; /** * Extract test case ID from test annotations or title */ export declare function extractTestCaseId(test: TestCase): string | undefined; /** * Get full test title including suite hierarchy */ export declare function getFullTitle(test: TestCase): string; /** * Map Playwright test status to QAStudio.dev status */ export declare function mapTestStatus(status: string): 'passed' | 'failed' | 'skipped' | 'timedout'; /** * Extract attachments from test result */ export declare function extractAttachments(result: TestResult): QAStudioAttachment[]; /** * Extract attachments as buffers for multipart upload */ export declare function extractAttachmentsAsBuffers(result: TestResult): Array<{ name: string; contentType: string; data: Buffer; type: 'screenshot' | 'video' | 'trace' | 'other'; }>; /** * Determine attachment type from name and content type */ export declare function determineAttachmentType(name: string, contentType: string): 'screenshot' | 'video' | 'trace' | 'other'; /** * Extract console output from test result */ export declare function extractConsoleOutput(output: (string | Buffer)[] | undefined): string | undefined; /** * Extract custom metadata from test */ export declare function extractMetadata(test: TestCase): Record; /** * Read file as buffer */ export declare function readFileAsBuffer(filePath: string): Promise; /** * Batch array into chunks */ export declare function batchArray(array: T[], size: number): T[][]; /** * Format duration in human-readable format */ export declare function formatDuration(ms: number): string; /** * Generate default test run name */ export declare function generateTestRunName(): string; /** * Strip ANSI escape codes from a string * Removes color codes and other terminal formatting that can interfere with API calls */ export declare function stripAnsi(str: string | undefined): string | undefined; /** * Sanitize and validate a URL string */ export declare function sanitizeUrl(url: string): string; /** * Sanitize a string field by removing ANSI codes */ export declare function sanitizeString(str: string | undefined): string | undefined; /** * Validate reporter options */ export declare function validateOptions(options: unknown): void; //# sourceMappingURL=utils.d.ts.map