@mmisty/cypress-allure-adapter
Version:
cypress allure adapter to generate allure results during tests execution (Allure TestOps compatible)
45 lines (44 loc) • 1.4 kB
TypeScript
import type { ServerOperation } from './allure-operations';
import { AllureTaskClient } from './allure-task-client';
type TaskFn = () => Promise<unknown>;
export interface TaskManagerOptions {
taskTimeout?: number;
overallTimeout?: number;
maxParallel?: number;
}
/**
* Task Manager
*
* Queues and executes tasks. Supports both:
* - Legacy function-based tasks (executed locally)
* - Serializable operations (sent to remote server via client)
*/
export declare class TaskManager {
private entityQueues;
private semaphore;
private client;
private options;
constructor(options?: TaskManagerOptions);
/**
* Set the client for remote task execution
*/
setClient(client: AllureTaskClient): void;
/**
* Schedule queue processing on next tick (deferred to not block current execution)
*/
private scheduleProcessQueue;
/**
* Add a legacy function-based task
* @deprecated Use addOperation for new code
*/
addTask(entityId: string | undefined, task: TaskFn): void;
/**
* Add a serializable operation to be executed on the server
*/
addOperation(entityId: string | undefined, operation: ServerOperation): void;
processQueue(entityId: string): Promise<void>;
private runWithTimeout;
flushAllTasks(): Promise<void>;
flushAllTasksForQueue(entityId: string): Promise<void>;
}
export {};