1 | import type { Capabilities } from '@wdio/types';
|
2 | import WDIOReporter, { TestStats } from '@wdio/reporter';
|
3 | import type { SuiteStats, HookStats, RunnerStats } from '@wdio/reporter';
|
4 | import { ChalkColors, type SpecReporterOptions, type TestLink, type Symbols, State } from './types.js';
|
5 | export default class SpecReporter extends WDIOReporter {
|
6 | private _suiteUids;
|
7 | private _indents;
|
8 | private _suiteIndents;
|
9 | private _orderedSuites;
|
10 | private _consoleOutput;
|
11 | private _suiteIndent;
|
12 | private _preface;
|
13 | private _consoleLogs;
|
14 | private _pendingReasons;
|
15 | private _originalStdoutWrite;
|
16 | private _addConsoleLogs;
|
17 | private _realtimeReporting;
|
18 | private _showPreface;
|
19 | private _suiteName;
|
20 | private _stateCounts;
|
21 | private _symbols;
|
22 | private _chalk;
|
23 | private _onlyFailures;
|
24 | private _sauceLabsSharableLinks;
|
25 | constructor(options: SpecReporterOptions);
|
26 | /**
|
27 | * @param state state of test execution
|
28 | * @param msg the message to print in terminal
|
29 | * @returns colord value based on chalk to print in terminal
|
30 | */
|
31 | setMessageColor(message: string, state?: State): string;
|
32 | onRunnerStart(runner: RunnerStats): void;
|
33 | onSuiteStart(suite: SuiteStats): void;
|
34 | onSuiteEnd(): void;
|
35 | onHookEnd(hook: HookStats): void;
|
36 | onTestStart(): void;
|
37 | onTestPass(testStat: TestStats): void;
|
38 | onTestFail(testStat: TestStats): void;
|
39 | onTestSkip(testStat: TestStats): void;
|
40 | onRunnerEnd(runner: RunnerStats): void;
|
41 | /**
|
42 | * Print the report to the stdout realtime
|
43 | */
|
44 | printCurrentStats(stat: TestStats | HookStats | SuiteStats): void;
|
45 | /**
|
46 | * Print the report to the screen
|
47 | */
|
48 | printReport(runner: RunnerStats): void;
|
49 | /**
|
50 | * get link to saucelabs job
|
51 | */
|
52 | getTestLink({ sessionId, isMultiremote, instanceName, capabilities }: TestLink): string[];
|
53 | /**
|
54 | * Get the header display for the report
|
55 | * @param {Object} runner Runner data
|
56 | * @return {Array} Header data
|
57 | */
|
58 | getHeaderDisplay(runner: RunnerStats): string[];
|
59 | |
60 |
|
61 |
|
62 |
|
63 |
|
64 | getEventsToReport(suite: SuiteStats): (HookStats | TestStats)[];
|
65 | |
66 |
|
67 |
|
68 |
|
69 |
|
70 | getResultDisplay(prefaceString?: string): string[];
|
71 | |
72 |
|
73 |
|
74 |
|
75 |
|
76 | getCountDisplay(duration: string): string[];
|
77 | |
78 |
|
79 |
|
80 |
|
81 | getFailureDisplay(): string[];
|
82 | |
83 |
|
84 |
|
85 |
|
86 | getOrderedSuites(): SuiteStats[];
|
87 | |
88 |
|
89 |
|
90 |
|
91 |
|
92 | indent(uid: string): string;
|
93 | |
94 |
|
95 |
|
96 |
|
97 |
|
98 | getSymbol(state?: keyof Symbols): string;
|
99 | |
100 |
|
101 |
|
102 |
|
103 |
|
104 | getColor(state?: string): ChalkColors;
|
105 | |
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 | getEnviromentCombo(capability: Capabilities.ResolvedTestrunnerCapabilities, verbose?: boolean, isMultiremote?: boolean): string;
|
113 | }
|
114 |
|
\ | No newline at end of file |