ortoni-report 3.0.5 → 4.0.2-beta.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.
Files changed (45) hide show
  1. package/changelog.md +30 -0
  2. package/dist/chunk-45EJSEX2.mjs +632 -0
  3. package/dist/chunk-75EAJL2U.mjs +632 -0
  4. package/dist/chunk-FGIYOFIC.mjs +632 -0
  5. package/dist/chunk-FHKWBHU6.mjs +633 -0
  6. package/dist/chunk-GLICR3VS.mjs +637 -0
  7. package/dist/chunk-HFO6XSKC.mjs +633 -0
  8. package/dist/chunk-HOZD6YIV.mjs +634 -0
  9. package/dist/chunk-IJO2YIFE.mjs +637 -0
  10. package/dist/chunk-INS3E7E6.mjs +638 -0
  11. package/dist/chunk-JEIWNUQY.mjs +632 -0
  12. package/dist/chunk-JPLAGYR7.mjs +632 -0
  13. package/dist/chunk-NM6ULN2O.mjs +632 -0
  14. package/dist/chunk-OZS6QIJS.mjs +638 -0
  15. package/dist/chunk-P57227VN.mjs +633 -0
  16. package/dist/chunk-QMTRYN5N.js +635 -0
  17. package/dist/chunk-TI33PMMQ.mjs +639 -0
  18. package/dist/chunk-Z5NBP5TS.mjs +635 -0
  19. package/dist/cli/cli.cjs +678 -0
  20. package/dist/cli/cli.d.cts +1 -0
  21. package/dist/cli/cli.js +580 -11
  22. package/dist/cli/cli.mjs +62 -5
  23. package/dist/index.html +21 -0
  24. package/dist/ortoni-report.cjs +2134 -0
  25. package/dist/ortoni-report.d.cts +111 -0
  26. package/dist/ortoni-report.d.mts +3 -12
  27. package/dist/ortoni-report.d.ts +3 -12
  28. package/dist/ortoni-report.js +182 -314
  29. package/dist/ortoni-report.mjs +64 -740
  30. package/package.json +4 -5
  31. package/readme.md +26 -33
  32. package/dist/chunk-AY2PKDHU.mjs +0 -69
  33. package/dist/chunk-OOALU4XG.mjs +0 -72
  34. package/dist/chunk-ZSIRUQUA.mjs +0 -68
  35. package/dist/style/main.css +0 -80
  36. package/dist/views/analytics.hbs +0 -103
  37. package/dist/views/head.hbs +0 -11
  38. package/dist/views/main.hbs +0 -1295
  39. package/dist/views/project.hbs +0 -238
  40. package/dist/views/sidebar.hbs +0 -244
  41. package/dist/views/summaryCard.hbs +0 -15
  42. package/dist/views/testIcons.hbs +0 -13
  43. package/dist/views/testPanel.hbs +0 -45
  44. package/dist/views/testStatus.hbs +0 -9
  45. package/dist/views/userInfo.hbs +0 -260
@@ -0,0 +1,111 @@
1
+ import { Reporter, FullConfig, Suite, TestCase, TestResult, TestError, FullResult } from '@playwright/test/reporter';
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 "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
+ * If true, images will be encoded in base64.
41
+ * Not recommended to use if many screenshots are present.
42
+ * @default false
43
+ * @example true
44
+ */
45
+ base64Image?: boolean;
46
+ /**
47
+ * The local relative of the logo image.
48
+ * Recommended to keep within the report genrated folder.
49
+ * @default "ortoni-report/logo.png"
50
+ * @example "logo.png"
51
+ */
52
+ logo?: string;
53
+ /**
54
+ * The filename to the html report.
55
+ * @example "index.html"
56
+ * @default "ortoni-report.html"
57
+ */
58
+ filename?: string;
59
+ /**
60
+ * The folder name.
61
+ * @example "report"
62
+ * @default "ortoni-report"
63
+ */
64
+ folderPath?: string;
65
+ /**
66
+ * Port to connect
67
+ * @example 3600
68
+ */
69
+ port?: number;
70
+ /**
71
+ * Display console logs?
72
+ * @example boolean
73
+ * @default true
74
+ */
75
+ stdIO?: boolean;
76
+ /**
77
+ * Metadata for the report. ['Test Cycle': 'Cycle 1', 'Test Environment':'QA', etc]
78
+ * @example { "key": "value" } as string
79
+ */
80
+ meta?: Record<string, string>;
81
+ }
82
+
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
+ private skipTraceViewer;
99
+ private config;
100
+ constructor(ortoniConfig?: OrtoniReportConfig);
101
+ private reportsCount;
102
+ onBegin(config: FullConfig, _suite: Suite): Promise<void>;
103
+ onStdOut(chunk: string | Buffer, _test: void | TestCase, _result: void | TestResult): void;
104
+ onTestEnd(test: TestCase, result: TestResult): void;
105
+ printsToStdio(): boolean;
106
+ onError(error: TestError): void;
107
+ onEnd(result: FullResult): Promise<void>;
108
+ onExit(): Promise<void>;
109
+ }
110
+
111
+ export { OrtoniReport, type OrtoniReportConfig, OrtoniReport as default };
@@ -36,15 +36,9 @@ interface OrtoniReportConfig {
36
36
  * @example "Regression"
37
37
  */
38
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
39
  /**
47
40
  * If true, images will be encoded in base64.
41
+ * Not recommended to use if many screenshots are present.
48
42
  * @default false
49
43
  * @example true
50
44
  */
@@ -80,14 +74,10 @@ interface OrtoniReportConfig {
80
74
  */
81
75
  stdIO?: boolean;
82
76
  /**
83
- * Metadata for the report. ['TestCycle': 'Cycle 1', 'TestEnvironment':'QA', etc]
77
+ * Metadata for the report. ['Test Cycle': 'Cycle 1', 'Test Environment':'QA', etc]
84
78
  * @example { "key": "value" } as string
85
79
  */
86
80
  meta?: Record<string, string>;
87
- /**
88
- * Chart type on the dashboard.
89
- * @example "doughnut" | "pie" */
90
- chartType?: "doughnut" | "pie";
91
81
  }
92
82
 
93
83
  declare class OrtoniReport implements Reporter {
@@ -106,6 +96,7 @@ declare class OrtoniReport implements Reporter {
106
96
  private shouldGenerateReport;
107
97
  private showConsoleLogs;
108
98
  private skipTraceViewer;
99
+ private config;
109
100
  constructor(ortoniConfig?: OrtoniReportConfig);
110
101
  private reportsCount;
111
102
  onBegin(config: FullConfig, _suite: Suite): Promise<void>;
@@ -36,15 +36,9 @@ interface OrtoniReportConfig {
36
36
  * @example "Regression"
37
37
  */
38
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
39
  /**
47
40
  * If true, images will be encoded in base64.
41
+ * Not recommended to use if many screenshots are present.
48
42
  * @default false
49
43
  * @example true
50
44
  */
@@ -80,14 +74,10 @@ interface OrtoniReportConfig {
80
74
  */
81
75
  stdIO?: boolean;
82
76
  /**
83
- * Metadata for the report. ['TestCycle': 'Cycle 1', 'TestEnvironment':'QA', etc]
77
+ * Metadata for the report. ['Test Cycle': 'Cycle 1', 'Test Environment':'QA', etc]
84
78
  * @example { "key": "value" } as string
85
79
  */
86
80
  meta?: Record<string, string>;
87
- /**
88
- * Chart type on the dashboard.
89
- * @example "doughnut" | "pie" */
90
- chartType?: "doughnut" | "pie";
91
81
  }
92
82
 
93
83
  declare class OrtoniReport implements Reporter {
@@ -106,6 +96,7 @@ declare class OrtoniReport implements Reporter {
106
96
  private shouldGenerateReport;
107
97
  private showConsoleLogs;
108
98
  private skipTraceViewer;
99
+ private config;
109
100
  constructor(ortoniConfig?: OrtoniReportConfig);
110
101
  private reportsCount;
111
102
  onBegin(config: FullConfig, _suite: Suite): Promise<void>;