ortoni-report 2.0.9 → 3.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.
@@ -1,109 +1,114 @@
1
1
  import { Reporter, FullConfig, Suite, TestCase, TestResult, TestError, FullResult } from '@playwright/test/reporter';
2
2
 
3
- /**
4
- * Configuration options for OrtoniReport.
5
- */
6
- interface OrtoniReportConfig {
7
- /**
8
- * Open the report in local host (Trace viewer is accessible only in localhost)
9
- * @example "always"| "never"| "on-failure";
10
- * @default "always"
11
- */
12
- open?: "always" | "never" | "on-failure";
13
- /**
14
- * The title of the HTML report.
15
- * @example "Ortoni Playwright Test Report"
16
- */
17
- title?: string;
18
- /**
19
- * Add project on the list of the tests? (Filtering projects still works if hidden)
20
- * @example true to display, false to hide.
21
- * @default false
22
- */
23
- showProject?: boolean;
24
- /**
25
- * The name of the project.
26
- * @example "Ortoni Project"
27
- */
28
- projectName?: string;
29
- /**
30
- * The name of the author.
31
- * @example "Koushik Chatterjee"
32
- */
33
- authorName?: string;
34
- /**
35
- * The type of tests being run.
36
- * @example "Regression"
37
- */
38
- testType?: string;
39
- /**
40
- * The preferred theme for the report.
41
- * Can be either "light" or "dark".
42
- * @default "System theme"
43
- * @example "dark"
44
- */
45
- preferredTheme?: 'light' | 'dark';
46
- /**
47
- * If true, images will be encoded in base64.
48
- * @default false
49
- * @example true
50
- */
51
- base64Image?: boolean;
52
- /**
53
- * The local relative of the logo image.
54
- * Recommended to keep within the ${folderPath} folder
55
- * @example "folderPath/logo.png"
56
- */
57
- logo?: string;
58
- /**
59
- * The filename to the html report.
60
- * @example "index.html"
61
- * @default "ortoni-report.html"
62
- */
63
- filename?: string;
64
- /**
65
- * The folder name.
66
- * @example "report"
67
- * @default "ortoni-report"
68
- */
69
- folderPath?: string;
70
- /**
71
- * Port to connect
72
- * @example 3600
73
- */
74
- port?: number;
75
- /**
76
- * Display console logs?
77
- * @example boolean
78
- * @default true
79
- */
80
- stdIO?: boolean;
3
+ /**
4
+ * Configuration options for OrtoniReport.
5
+ */
6
+ interface OrtoniReportConfig {
7
+ /**
8
+ * Open the report in local host (Trace viewer is accessible only in localhost)
9
+ * @example "always"| "never"| "on-failure";
10
+ * @default "never"
11
+ */
12
+ open?: "always" | "never" | "on-failure";
13
+ /**
14
+ * The title of the HTML report.
15
+ * @example "Ortoni Playwright Test Report"
16
+ */
17
+ title?: string;
18
+ /**
19
+ * Add project on the list of the tests? (Filtering projects still works if hidden)
20
+ * @example true to display, false to hide.
21
+ * @default false
22
+ */
23
+ showProject?: boolean;
24
+ /**
25
+ * The name of the project.
26
+ * @example "Ortoni Project"
27
+ */
28
+ projectName?: string;
29
+ /**
30
+ * The name of the author.
31
+ * @example "Koushik Chatterjee"
32
+ */
33
+ authorName?: string;
34
+ /**
35
+ * The type of tests being run.
36
+ * @example "Regression"
37
+ */
38
+ testType?: string;
39
+ /**
40
+ * The preferred theme for the report.
41
+ * Can be either "light" or "dark".
42
+ * @default "System theme"
43
+ * @example "dark"
44
+ */
45
+ preferredTheme?: "light" | "dark";
46
+ /**
47
+ * If true, images will be encoded in base64.
48
+ * @default false
49
+ * @example true
50
+ */
51
+ base64Image?: boolean;
52
+ /**
53
+ * The local relative of the logo image.
54
+ * Recommended to keep within the ${folderPath} folder
55
+ * @example "folderPath/logo.png"
56
+ */
57
+ logo?: string;
58
+ /**
59
+ * The filename to the html report.
60
+ * @example "index.html"
61
+ * @default "ortoni-report.html"
62
+ */
63
+ filename?: string;
64
+ /**
65
+ * The folder name.
66
+ * @example "report"
67
+ * @default "ortoni-report"
68
+ */
69
+ folderPath?: string;
70
+ /**
71
+ * Port to connect
72
+ * @example 3600
73
+ */
74
+ port?: number;
75
+ /**
76
+ * Display console logs?
77
+ * @example boolean
78
+ * @default true
79
+ */
80
+ stdIO?: boolean;
81
+ /**
82
+ * Metadata for the report. ['TestCycle': 'Cycle 1', 'TestEnvironment':'QA', etc]
83
+ * @example { "key": "value" } as string
84
+ */
85
+ meta?: Record<string, string>;
81
86
  }
82
87
 
83
- declare class OrtoniReport implements Reporter {
84
- private ortoniConfig;
85
- private testResultProcessor;
86
- private htmlGenerator;
87
- private fileManager;
88
- private serverManager;
89
- private results;
90
- private projectSet;
91
- private overAllStatus;
92
- private folderPath;
93
- private outputFilename;
94
- private outputPath;
95
- private dbManager;
96
- private shouldGenerateReport;
97
- private showConsoleLogs;
98
- constructor(ortoniConfig?: OrtoniReportConfig);
99
- private reportsCount;
100
- onBegin(config: FullConfig, _suite: Suite): Promise<void>;
101
- onStdOut(chunk: string | Buffer, _test: void | TestCase, _result: void | TestResult): void;
102
- onTestEnd(test: TestCase, result: TestResult): void;
103
- printsToStdio(): boolean;
104
- onError(error: TestError): void;
105
- onEnd(result: FullResult): Promise<void>;
106
- onExit(): Promise<void>;
88
+ declare class OrtoniReport implements Reporter {
89
+ private ortoniConfig;
90
+ private testResultProcessor;
91
+ private htmlGenerator;
92
+ private fileManager;
93
+ private serverManager;
94
+ private results;
95
+ private projectSet;
96
+ private overAllStatus;
97
+ private folderPath;
98
+ private outputFilename;
99
+ private outputPath;
100
+ private dbManager;
101
+ private shouldGenerateReport;
102
+ private showConsoleLogs;
103
+ constructor(ortoniConfig?: OrtoniReportConfig);
104
+ private reportsCount;
105
+ onBegin(config: FullConfig, _suite: Suite): Promise<void>;
106
+ onStdOut(chunk: string | Buffer, _test: void | TestCase, _result: void | TestResult): void;
107
+ onTestEnd(test: TestCase, result: TestResult): void;
108
+ printsToStdio(): boolean;
109
+ onError(error: TestError): void;
110
+ onEnd(result: FullResult): Promise<void>;
111
+ onExit(): Promise<void>;
107
112
  }
108
113
 
109
- export { OrtoniReport, OrtoniReportConfig, OrtoniReport as default };
114
+ export { OrtoniReport, type OrtoniReportConfig, OrtoniReport as default };