ortoni-report 2.0.4 → 2.0.5
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/changelog.md +11 -0
- package/dist/ortoni-report.d.ts +27 -47
- package/dist/ortoni-report.js +23151 -268
- package/dist/ortoni-report.mjs +23146 -269
- package/dist/style/main.css +40 -1
- package/dist/utils/expressServer.js +33 -0
- package/dist/utils/utils.js +17 -1
- package/dist/utils/webSocketHelper.js +93 -0
- package/dist/views/main.hbs +168 -113
- package/dist/views/testPanel.hbs +0 -1
- package/dist/views/userInfo.hbs +10 -9
- package/package.json +3 -1
- package/readme.md +110 -67
package/changelog.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Change Log:
|
|
2
2
|
|
|
3
|
+
## v2.0.5
|
|
4
|
+
|
|
5
|
+
### 🚀 New Features
|
|
6
|
+
- **Open report in localhost**: Introduced the ability to open the report on localhost with configurable options:
|
|
7
|
+
- `open?: "always" | "never" | "on-failure"`.
|
|
8
|
+
- **Open Trace viewer within the same browser**: Added functionality to view the Playwright trace within the same browser tab, enhancing the user experience.
|
|
9
|
+
|
|
10
|
+
### ✨ Improvements
|
|
11
|
+
- **Perfect Test content UI**: Enhanced the UI of the test content for a more polished and user-friendly interface.
|
|
12
|
+
- **Refactored code with multiple classes and utilities**: Codebase has been refactored for better organization, incorporating multiple classes and utilities to improve maintainability and scalability.
|
|
13
|
+
|
|
3
14
|
## Version 2.0.4
|
|
4
15
|
|
|
5
16
|
### 🚀 New Features
|
package/dist/ortoni-report.d.ts
CHANGED
|
@@ -4,6 +4,12 @@ import { Reporter, FullConfig, Suite, TestCase, TestResult, FullResult } from '@
|
|
|
4
4
|
* Configuration options for OrtoniReport.
|
|
5
5
|
*/
|
|
6
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";
|
|
7
13
|
/**
|
|
8
14
|
* The title of the HTML report.
|
|
9
15
|
* @example "Ortoni Playwright Test Report"
|
|
@@ -12,6 +18,7 @@ interface OrtoniReportConfig {
|
|
|
12
18
|
/**
|
|
13
19
|
* Add project on the list of the tests? (Filtering projects still works if hidden)
|
|
14
20
|
* @example true to display, false to hide.
|
|
21
|
+
* @default false
|
|
15
22
|
*/
|
|
16
23
|
showProject?: boolean;
|
|
17
24
|
/**
|
|
@@ -21,7 +28,7 @@ interface OrtoniReportConfig {
|
|
|
21
28
|
projectName?: string;
|
|
22
29
|
/**
|
|
23
30
|
* The name of the author.
|
|
24
|
-
* @example "
|
|
31
|
+
* @example "Koushik Chatterjee"
|
|
25
32
|
*/
|
|
26
33
|
authorName?: string;
|
|
27
34
|
/**
|
|
@@ -43,19 +50,21 @@ interface OrtoniReportConfig {
|
|
|
43
50
|
*/
|
|
44
51
|
base64Image?: boolean;
|
|
45
52
|
/**
|
|
46
|
-
* The local relative
|
|
47
|
-
*
|
|
48
|
-
* @example "/
|
|
53
|
+
* The local relative of the logo image.
|
|
54
|
+
* Recommended to keep within the ${folderPath} folder
|
|
55
|
+
* @example "folderPath/logo.png"
|
|
49
56
|
*/
|
|
50
57
|
logo?: string;
|
|
51
58
|
/**
|
|
52
59
|
* The filename to the html report.
|
|
53
60
|
* @example "index.html"
|
|
61
|
+
* @default "ortoni-report.html"
|
|
54
62
|
*/
|
|
55
63
|
filename?: string;
|
|
56
64
|
/**
|
|
57
65
|
* The folder name.
|
|
58
|
-
* @example "
|
|
66
|
+
* @example "report"
|
|
67
|
+
* @default "ortoni-report"
|
|
59
68
|
*/
|
|
60
69
|
folderPath?: string;
|
|
61
70
|
/**
|
|
@@ -65,53 +74,24 @@ interface OrtoniReportConfig {
|
|
|
65
74
|
port?: number;
|
|
66
75
|
}
|
|
67
76
|
|
|
68
|
-
interface Steps {
|
|
69
|
-
snippet: string | undefined;
|
|
70
|
-
title: string;
|
|
71
|
-
location: string;
|
|
72
|
-
}
|
|
73
|
-
interface TestResultData {
|
|
74
|
-
annotations: any;
|
|
75
|
-
testTags: string[];
|
|
76
|
-
location: string;
|
|
77
|
-
retry: string;
|
|
78
|
-
isRetry: number;
|
|
79
|
-
projectName: any;
|
|
80
|
-
suite: any;
|
|
81
|
-
title: string;
|
|
82
|
-
status: "passed" | "failed" | "timedOut" | "skipped" | "interrupted" | "expected" | "unexpected" | "flaky";
|
|
83
|
-
flaky: string;
|
|
84
|
-
duration: string;
|
|
85
|
-
errors: any[];
|
|
86
|
-
steps: Steps[];
|
|
87
|
-
logs: string;
|
|
88
|
-
screenshotPath?: string | null | undefined;
|
|
89
|
-
screenshots?: string[];
|
|
90
|
-
filePath: string;
|
|
91
|
-
filters: Set<string>;
|
|
92
|
-
tracePath?: string;
|
|
93
|
-
videoPath?: string;
|
|
94
|
-
base64Image: boolean | undefined;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
77
|
declare class OrtoniReport implements Reporter {
|
|
98
|
-
private
|
|
99
|
-
private
|
|
78
|
+
private ortoniConfig;
|
|
79
|
+
private testResultProcessor;
|
|
80
|
+
private htmlGenerator;
|
|
81
|
+
private fileManager;
|
|
82
|
+
private serverManager;
|
|
100
83
|
private results;
|
|
101
|
-
private groupedResults;
|
|
102
|
-
private suiteName;
|
|
103
|
-
private config;
|
|
104
84
|
private projectSet;
|
|
85
|
+
private overAllStatus;
|
|
105
86
|
private folderPath;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
87
|
+
private outputFilename;
|
|
88
|
+
private outputPath;
|
|
89
|
+
constructor(ortoniConfig?: OrtoniReportConfig);
|
|
90
|
+
onBegin(config: FullConfig, _suite: Suite): void;
|
|
91
|
+
onTestBegin(_test: TestCase, _result: TestResult): void;
|
|
109
92
|
onTestEnd(test: TestCase, result: TestResult): void;
|
|
110
|
-
private attachFiles;
|
|
111
93
|
onEnd(result: FullResult): void;
|
|
112
|
-
|
|
113
|
-
private groupResults;
|
|
114
|
-
generateHTML(filteredResults: TestResultData[], totalDuration: string, cssContent: string): string;
|
|
94
|
+
onExit(): Promise<void>;
|
|
115
95
|
}
|
|
116
96
|
|
|
117
|
-
export { OrtoniReportConfig, OrtoniReport as default };
|
|
97
|
+
export { OrtoniReport, OrtoniReportConfig, OrtoniReport as default };
|