import { vi } from "vite-plus/test"; // eslint-disable-next-line prefer-arrow/prefer-arrow-functions export const AllureReportMock = vi.fn(function (this: Record, config?: unknown) { this.config = config; }); AllureReportMock.prototype.store = { blockingFailedTestResults: vi.fn().mockResolvedValue([]), failedTestResults: vi.fn().mockResolvedValue([]), allTestResults: vi.fn().mockResolvedValue([]), allNewTestResults: vi.fn().mockResolvedValue([]), testsStatistic: vi.fn().mockResolvedValue({ total: 0, passed: 0, failed: 0, broken: 0, skipped: 0, unknown: 0 }), addQualityGateResult: vi.fn().mockResolvedValue(undefined), qualityGateResults: vi.fn().mockResolvedValue([]), }; AllureReportMock.prototype.realtimeSubscriber = { onTestResults: vi.fn(() => () => {}), }; AllureReportMock.prototype.realtimeDispatcher = { sendQualityGateResults: vi.fn(), sendGlobalAttachment: vi.fn(), sendProcessGlobalAttachment: vi.fn(), sendGlobalError: vi.fn(), sendProcessGlobalError: vi.fn(), sendProcessGlobalsReset: vi.fn(), sendGlobalExitCode: vi.fn(), }; AllureReportMock.prototype.readDirectory = vi.fn(); AllureReportMock.prototype.readResult = vi.fn(); AllureReportMock.prototype.start = vi.fn(); AllureReportMock.prototype.update = vi.fn(); AllureReportMock.prototype.done = vi.fn(); AllureReportMock.prototype.validate = vi.fn(); AllureReportMock.prototype.dumpState = vi.fn(); AllureReportMock.prototype.restoreState = vi.fn(); // eslint-disable-next-line prefer-arrow/prefer-arrow-functions export const AllureServiceClientMock = vi.fn(function () {}); AllureServiceClientMock.prototype.decodeToken = vi.fn(); AllureServiceClientMock.prototype.profile = vi.fn(); AllureServiceClientMock.prototype.generateNewAccessToken = vi.fn(); AllureServiceClientMock.prototype.projects = vi.fn(); AllureServiceClientMock.prototype.project = vi.fn(); AllureServiceClientMock.prototype.createProject = vi.fn(); AllureServiceClientMock.prototype.deleteProject = vi.fn(); AllureServiceClientMock.prototype.downloadHistory = vi.fn(); AllureServiceClientMock.prototype.createReport = vi.fn(); AllureServiceClientMock.prototype.completeReport = vi.fn(); AllureServiceClientMock.prototype.deleteReport = vi.fn(); AllureServiceClientMock.prototype.addReportAsset = vi.fn(); AllureServiceClientMock.prototype.addReportFile = vi.fn();