@arpanp/zen-reporter 0.10.1
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/LICENSE +21 -0
- package/README.md +146 -0
- package/bin/zen-reporter.js +673 -0
- package/dist/dataProcessor.d.ts +47 -0
- package/dist/exportToCsv.d.ts +15 -0
- package/dist/index.html +105 -0
- package/dist/reporter.cjs +871 -0
- package/dist/reporter.d.ts +61 -0
- package/dist/reporter.js +846 -0
- package/dist/runHistory.d.ts +21 -0
- package/dist/tagColors.d.ts +19 -0
- package/dist/types.d.ts +192 -0
- package/dist/utils.d.ts +126 -0
- package/package.json +102 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ReportData } from './types';
|
|
2
|
+
export declare function detectPackageManager(cwd?: string): string;
|
|
3
|
+
export declare function getViteBuildCommand(pm?: string, cwd?: string): string;
|
|
4
|
+
interface RawTestStep {
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
location?: {
|
|
8
|
+
file?: string;
|
|
9
|
+
line?: number;
|
|
10
|
+
column?: number;
|
|
11
|
+
} | null;
|
|
12
|
+
snippet?: string;
|
|
13
|
+
params?: Record<string, unknown>;
|
|
14
|
+
duration: number;
|
|
15
|
+
error?: {
|
|
16
|
+
message?: string;
|
|
17
|
+
stack?: string;
|
|
18
|
+
};
|
|
19
|
+
steps?: RawTestStep[];
|
|
20
|
+
}
|
|
21
|
+
interface RawError {
|
|
22
|
+
name?: string;
|
|
23
|
+
message?: string;
|
|
24
|
+
stack?: string;
|
|
25
|
+
}
|
|
26
|
+
interface RawTestCase {
|
|
27
|
+
title?: string;
|
|
28
|
+
parent?: {
|
|
29
|
+
title?: string;
|
|
30
|
+
};
|
|
31
|
+
project?: {
|
|
32
|
+
name?: string;
|
|
33
|
+
};
|
|
34
|
+
location?: {
|
|
35
|
+
file?: string;
|
|
36
|
+
};
|
|
37
|
+
status?: string;
|
|
38
|
+
duration?: number;
|
|
39
|
+
steps?: RawTestStep[];
|
|
40
|
+
errors?: RawError[];
|
|
41
|
+
tags?: string[];
|
|
42
|
+
}
|
|
43
|
+
interface RawPlaywrightData {
|
|
44
|
+
tests?: RawTestCase[];
|
|
45
|
+
}
|
|
46
|
+
export declare function processRawData(rawData: RawPlaywrightData): ReportData;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight CSV Export helper (zero 3rd-party dependencies).
|
|
3
|
+
* Properly escapes fields with commas, quotes, and newlines per RFC 4180.
|
|
4
|
+
*/
|
|
5
|
+
export type CsvRowValue = string | number | boolean | null | undefined;
|
|
6
|
+
export interface CsvColumn<T> {
|
|
7
|
+
header: string;
|
|
8
|
+
getValue: (item: T, index: number) => CsvRowValue;
|
|
9
|
+
}
|
|
10
|
+
/** Escapes a single value for CSV compliance */
|
|
11
|
+
export declare function escapeCsvCell(value: CsvRowValue): string;
|
|
12
|
+
/** Converts an array of objects/rows and column definitions into a CSV string */
|
|
13
|
+
export declare function exportToCsvString<T>(data: T[], columns: CsvColumn<T>[]): string;
|
|
14
|
+
/** Triggers a browser file download of a CSV file with Save As file picker support */
|
|
15
|
+
export declare function downloadCsv<T>(filename: string, data: T[], columns: CsvColumn<T>[]): Promise<void>;
|