@bigbinary/neeto-playwright-reporter 1.8.9 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +3 -3
- package/index.cjs.js.map +1 -1
- package/index.d.ts +36 -4
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/package.json +2 -1
package/index.d.ts
CHANGED
|
@@ -3,6 +3,37 @@ import { ReporterOptionParams } from 'types';
|
|
|
3
3
|
import { Reporter, FullConfig, Suite, TestCase, TestResult, FullResult } from '@playwright/test/reporter';
|
|
4
4
|
import * as _playwright_test from '@playwright/test';
|
|
5
5
|
|
|
6
|
+
interface HeartbeatOptions {
|
|
7
|
+
interval: number;
|
|
8
|
+
maxRetries: number;
|
|
9
|
+
requestTimeout: number;
|
|
10
|
+
retryDelay: number;
|
|
11
|
+
emergencyThreshold: number;
|
|
12
|
+
}
|
|
13
|
+
declare class HeartbeatManagerService {
|
|
14
|
+
private readonly ciBuildId;
|
|
15
|
+
private readonly options;
|
|
16
|
+
private interval;
|
|
17
|
+
private emergencyTimeout;
|
|
18
|
+
private isServiceActive;
|
|
19
|
+
private isHeartbeatInProgress;
|
|
20
|
+
private lastSuccessfulHeartbeat;
|
|
21
|
+
constructor(ciBuildId: string, options?: HeartbeatOptions);
|
|
22
|
+
start: () => Promise<void>;
|
|
23
|
+
stop: () => void;
|
|
24
|
+
private scheduleNextHeartbeat;
|
|
25
|
+
private scheduleEmergencyCheck;
|
|
26
|
+
private sendHeartbeat;
|
|
27
|
+
private sendEmergencyHeartbeat;
|
|
28
|
+
private handleHeartbeatFailure;
|
|
29
|
+
sendImmediateHeartbeat: () => Promise<void>;
|
|
30
|
+
get status(): {
|
|
31
|
+
isServiceActive: boolean;
|
|
32
|
+
isHeartbeatInProgress: boolean;
|
|
33
|
+
lastHeartbeat: number;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
6
37
|
interface LighthouseReportMetadata {
|
|
7
38
|
formats: {
|
|
8
39
|
html: true;
|
|
@@ -17,6 +48,7 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
17
48
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions>;
|
|
18
49
|
|
|
19
50
|
declare class NeetoPlaywrightReporter implements Reporter {
|
|
51
|
+
private reportLifecycleError;
|
|
20
52
|
attempts: Record<string, Record<string, string>> | Record<string, never>;
|
|
21
53
|
ciBuildId: string;
|
|
22
54
|
config: FullConfig | undefined;
|
|
@@ -26,16 +58,16 @@ declare class NeetoPlaywrightReporter implements Reporter {
|
|
|
26
58
|
tags: string[] | string;
|
|
27
59
|
unreportedAttemptCount: number;
|
|
28
60
|
hasRunStarted: boolean;
|
|
29
|
-
|
|
61
|
+
heartbeatManager: HeartbeatManagerService | null;
|
|
30
62
|
rootDir: string;
|
|
31
63
|
progressBars: (Bar | void)[];
|
|
32
64
|
startedAttempts: Set<string>;
|
|
33
65
|
shouldNotReportTest: boolean;
|
|
34
66
|
apiKey: string;
|
|
35
67
|
constructor(options: ReporterOptionParams);
|
|
36
|
-
onBegin: (config: FullConfig, rootSuite: Suite) =>
|
|
37
|
-
onTestBegin: (test: TestCase, result: TestResult) =>
|
|
38
|
-
onTestEnd: (testCase: TestCase, testResult: TestResult) =>
|
|
68
|
+
onBegin: (config: FullConfig, rootSuite: Suite) => void;
|
|
69
|
+
onTestBegin: (test: TestCase, result: TestResult) => void;
|
|
70
|
+
onTestEnd: (testCase: TestCase, testResult: TestResult) => void;
|
|
39
71
|
onEnd: (fullResult: FullResult) => Promise<void>;
|
|
40
72
|
onStdOut(chunk: string | Buffer, test: void | TestCase): void;
|
|
41
73
|
}
|