ortoni-report 3.0.2 → 3.0.4
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 +99 -38
- package/dist/chunk-A6HCKATU.mjs +76 -0
- package/dist/chunk-AY2PKDHU.mjs +69 -0
- package/dist/chunk-OOALU4XG.mjs +72 -0
- package/dist/cli/cli.js +7 -3
- package/dist/cli/cli.mjs +1 -1
- package/dist/ortoni-report.d.mts +1 -0
- package/dist/ortoni-report.d.ts +1 -0
- package/dist/ortoni-report.js +1373 -62
- package/dist/ortoni-report.mjs +1366 -60
- package/dist/views/analytics.hbs +93 -95
- package/dist/views/head.hbs +1 -1
- package/dist/views/main.hbs +36 -5
- package/package.json +5 -4
- package/readme.md +13 -7
package/changelog.md
CHANGED
|
@@ -1,69 +1,102 @@
|
|
|
1
1
|
# Change Log:
|
|
2
2
|
|
|
3
|
+
## v3.0.4
|
|
4
|
+
|
|
5
|
+
#### 🐛 Bug Fixes
|
|
6
|
+
|
|
7
|
+
- Chart not showing latest trends
|
|
8
|
+
|
|
9
|
+
## v3.0.3
|
|
10
|
+
|
|
11
|
+
#### 📦 New Features
|
|
12
|
+
|
|
13
|
+
- Added a "Copy" button next to test spec file line numbers for quick sharing or navigation.
|
|
14
|
+
- Enabled support to open Markdown files, useful for AI-generated code snippets or documentation.
|
|
15
|
+
|
|
16
|
+
#### 🐛 Bug Fixes
|
|
17
|
+
|
|
18
|
+
- Fixed extra top spacing issue on the Analytics page.
|
|
19
|
+
|
|
20
|
+
#### 👌 Improvements
|
|
21
|
+
|
|
22
|
+
- Displayed test trends in ascending order for better chronological clarity.
|
|
23
|
+
- Skipped copying the trace folder when disabled via user configuration to optimize report generation.
|
|
24
|
+
|
|
3
25
|
## v3.0.2
|
|
4
26
|
|
|
5
27
|
#### 📦 New Features
|
|
28
|
+
|
|
6
29
|
1. Test Analytics dashboard
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
30
|
+
|
|
31
|
+
- Shows summary of total runs, totals test, passed, failed, pass rate and average duration
|
|
32
|
+
- Trends over time - upto 30 runs
|
|
33
|
+
- Top flaky test list
|
|
34
|
+
- slowest test list with average duration
|
|
11
35
|
|
|
12
36
|
#### 👌 Improvements
|
|
13
|
-
1. Set chart option as pie or doughnut for summary and projects
|
|
14
37
|
|
|
38
|
+
1. Set chart option as pie or doughnut for summary and projects
|
|
15
39
|
|
|
16
40
|
## v3.0.1
|
|
17
41
|
|
|
18
42
|
#### 👌 Improvements
|
|
19
43
|
|
|
20
44
|
1. **Logo**:
|
|
21
|
-
|
|
22
|
-
|
|
45
|
+
|
|
46
|
+
- Add project specific logo to the dashboard page
|
|
47
|
+
- If logo is present then Dashboar text is hidden
|
|
23
48
|
|
|
24
49
|
2. **Bundler size**:
|
|
25
|
-
- Reduced bundler package size from 1.20 mB to 104 kB
|
|
26
|
-
- Reduced bundler unpacked size from 5 mB to 760 kB
|
|
27
50
|
|
|
28
|
-
|
|
29
|
-
|
|
51
|
+
- Reduced bundler package size from 1.20 mB to 104 kB
|
|
52
|
+
- Reduced bundler unpacked size from 5 mB to 760 kB
|
|
53
|
+
|
|
54
|
+
3. **Test History**
|
|
55
|
+
|
|
56
|
+
- Improved test history UI
|
|
30
57
|
|
|
31
58
|
4. **Chart**
|
|
32
|
-
|
|
59
|
+
|
|
60
|
+
- Improved chart layout with plot area chart for summary
|
|
33
61
|
|
|
34
62
|
#### 🐛 Fixes
|
|
35
63
|
|
|
36
64
|
1. Percentage is taking retry also in count #64
|
|
37
65
|
|
|
38
|
-
|
|
39
66
|
## v3.0.0
|
|
40
67
|
|
|
41
68
|
#### 📦 New Features
|
|
69
|
+
|
|
42
70
|
1. **SideBar**:
|
|
43
71
|
|
|
44
|
-
|
|
45
|
-
|
|
72
|
+
- Navbar is removed and a new side bar is introduces.
|
|
73
|
+
- Summay and Tests in 2 different section
|
|
46
74
|
|
|
47
75
|
2. **New Color Scheme**:
|
|
48
|
-
|
|
49
|
-
|
|
76
|
+
|
|
77
|
+
- All new design to enhance the user viewing and exploring options
|
|
78
|
+
- New Color scheme supports both dark and light theme
|
|
50
79
|
|
|
51
80
|
3. **Meta section**:
|
|
52
|
-
|
|
81
|
+
|
|
82
|
+
- User can add meta information about the project or release cycle (Refer to the example)
|
|
53
83
|
|
|
54
84
|
4. **Overall redisgn**:
|
|
55
|
-
- A new fresh UI look and perfomance increase
|
|
56
85
|
|
|
86
|
+
- A new fresh UI look and perfomance increase
|
|
57
87
|
|
|
58
88
|
## v2.0.9
|
|
59
89
|
|
|
60
90
|
#### 📦 New Features
|
|
91
|
+
|
|
61
92
|
- **Command to Open Report (CLI)**: Introduced a new command to open the Ortoni Report directly for streamlined access.
|
|
93
|
+
|
|
62
94
|
```
|
|
63
95
|
npx ortoni-report show-report
|
|
64
96
|
```
|
|
65
97
|
|
|
66
98
|
#### 👌 Improvements
|
|
99
|
+
|
|
67
100
|
- **Database Optimization**: Enhanced database operations with transactions and indexing for better performance and reliability.
|
|
68
101
|
- **CSS and UI Enhancements**:
|
|
69
102
|
- Improved tabbed design for steps, errors, and logs (#50), ensuring an organized and intuitive user experience.
|
|
@@ -75,32 +108,37 @@ npx ortoni-report show-report
|
|
|
75
108
|
## v2.0.8
|
|
76
109
|
|
|
77
110
|
#### 🐛 Fixes
|
|
111
|
+
|
|
78
112
|
- **Peer Dependency**: Added peer dependecy to avoid external package conflict
|
|
79
113
|
|
|
80
114
|
## v2.0.7
|
|
81
115
|
|
|
82
116
|
#### 📦 New Features
|
|
117
|
+
|
|
83
118
|
- **Test History Display**: Added support for displaying test history up to the last 10 executions, providing better insight into recent test performance.
|
|
84
119
|
- **Console Error Reporting**: Enhanced with console error display and the ability to skip report generation if no tests are found.
|
|
85
120
|
- **Console Log Configuration**: Introduced a new `console` boolean configuration option to toggle the display of test console logs, set to `true` by default.
|
|
86
121
|
|
|
87
122
|
#### 👌 Improvements
|
|
123
|
+
|
|
88
124
|
- **UI and CSS Enhancements**:
|
|
89
125
|
- Updated CSS color scheme and implemented minor UI tweaks for a more polished look.
|
|
90
126
|
- Added project-specific icons for Chromium, Firefox, and WebKit to make test projects easily identifiable.
|
|
91
127
|
|
|
92
128
|
#### 🐛 Fixes
|
|
93
|
-
- **Trace Link Bug (#38)**: Fixed an issue where the trace link only captured the origin and not the pathname, ensuring accurate trace navigation.
|
|
94
|
-
|
|
95
129
|
|
|
130
|
+
- **Trace Link Bug (#38)**: Fixed an issue where the trace link only captured the origin and not the pathname, ensuring accurate trace navigation.
|
|
96
131
|
|
|
97
132
|
## v2.0.6
|
|
98
133
|
|
|
99
134
|
#### 🐛 Fixes
|
|
135
|
+
|
|
100
136
|
- **Trace Path in Pipeline**: Resolved issue with incorrect trace file path in CI/CD pipeline, ensuring trace paths are properly resolved.
|
|
101
137
|
|
|
102
138
|
#### 👌 Improvements
|
|
139
|
+
|
|
103
140
|
- **Search Functionality**:
|
|
141
|
+
|
|
104
142
|
- **Removed from Navbar**: Search functionality has been removed from the navbar to enhance navigation simplicity.
|
|
105
143
|
- **Added to Test Panel**: Search functionality has been relocated to the test panel for more intuitive test filtering.
|
|
106
144
|
|
|
@@ -110,17 +148,20 @@ npx ortoni-report show-report
|
|
|
110
148
|
## v2.0.5
|
|
111
149
|
|
|
112
150
|
### 🚀 New Features
|
|
151
|
+
|
|
113
152
|
- **Open report in localhost**: Introduced the ability to open the report on localhost with configurable options:
|
|
114
153
|
- `open?: "always" | "never" | "on-failure"`.
|
|
115
154
|
- **Open Trace viewer within the same browser**: Added functionality to view the Playwright trace within the same browser tab, enhancing the user experience.
|
|
116
155
|
|
|
117
156
|
### ✨ Improvements
|
|
157
|
+
|
|
118
158
|
- **Perfect Test content UI**: Enhanced the UI of the test content for a more polished and user-friendly interface.
|
|
119
159
|
- **Refactored code with multiple classes and utilities**: Codebase has been refactored for better organization, incorporating multiple classes and utilities to improve maintainability and scalability.
|
|
120
160
|
|
|
121
161
|
## Version 2.0.4
|
|
122
162
|
|
|
123
163
|
### 🚀 New Features
|
|
164
|
+
|
|
124
165
|
- **Tags & Annotations**: Added support for tags and annotations, allowing for more detailed reporting and metadata.
|
|
125
166
|
- **Project charts & summary UI**: Enhanced the user interface of project charts and the summary section for better presentation and usability.
|
|
126
167
|
|
|
@@ -129,21 +170,24 @@ npx ortoni-report show-report
|
|
|
129
170
|
- **Snippets color**: Improved the color scheme of code snippets for better readability.
|
|
130
171
|
|
|
131
172
|
### 🛠 Fixes
|
|
173
|
+
|
|
132
174
|
- **Console warning**: Resolved a console warning issue, improving overall stability.
|
|
133
175
|
|
|
134
176
|
### Documentation
|
|
135
|
-
- **Removed colors package**: Updated documentation to reflect the removal of the `colors` package.
|
|
136
177
|
|
|
178
|
+
- **Removed colors package**: Updated documentation to reflect the removal of the `colors` package.
|
|
137
179
|
|
|
138
180
|
## Version 2.0.3
|
|
139
181
|
|
|
140
182
|
#### 🚀 New Features
|
|
183
|
+
|
|
141
184
|
- **Add screenshot attachment as pagination**: Now supports adding screenshot attachments for easier navigation and pagination.
|
|
142
185
|
- **Bulma Inline CSS**: Integrated Bulma inline CSS for improved styling.
|
|
143
186
|
- **Show card if the count has value**: Cards will now appear only when a valid count is present.
|
|
144
187
|
- **Folder Path**: Introduced a new feature to store the result in the folder path.
|
|
145
188
|
|
|
146
189
|
#### ✨ Improvements
|
|
190
|
+
|
|
147
191
|
- **Chart JS as CDN**: Enhanced performance by switching Chart.js to be served via CDN.
|
|
148
192
|
- **Theme icon, navbar & summary icons**: Refined the design of theme icons, navbar, and summary icons for a better user experience.
|
|
149
193
|
- **User meta icons**: Updated and improved the appearance of user meta icons.
|
|
@@ -158,23 +202,24 @@ npx ortoni-report show-report
|
|
|
158
202
|
|
|
159
203
|
- **Show or Hide Projects in Test List**
|
|
160
204
|
- You can now show or hide specific projects in the test list.
|
|
161
|
-
-
|
|
162
|
-
|
|
205
|
+
- `showProject: true` from config
|
|
163
206
|
- **Document Title from Config**
|
|
207
|
+
|
|
164
208
|
- The document title is now configurable via the configuration file, allowing you to customize it to your preference.
|
|
165
209
|
|
|
166
210
|
- **Display Tags in Test Section**
|
|
211
|
+
|
|
167
212
|
- Tags associated with tests are now displayed within the test section, giving you a clearer overview of test categories.
|
|
168
213
|
|
|
169
214
|
- **Project and Tags Added to Filter**
|
|
170
215
|
- We've added the ability to filter tests by both project and tags, enhancing the granularity of your test views.
|
|
171
|
-
|
|
172
216
|
- **Display Selected Status on UI**
|
|
173
217
|
- The selected status filter is now visible on the UI, making it easier to track the current filter settings.
|
|
174
218
|
|
|
175
219
|
#### 🛠 Fixes
|
|
176
220
|
|
|
177
221
|
- **Project Drop-down Z-Index on Screenshot**
|
|
222
|
+
|
|
178
223
|
- Resolved an issue where the project drop-down menu was being overlapped by screenshots. The z-index has been adjusted for proper layering.
|
|
179
224
|
|
|
180
225
|
- **Project Filter Hide Test Steps**
|
|
@@ -183,17 +228,19 @@ npx ortoni-report show-report
|
|
|
183
228
|
#### ✨ Improvements
|
|
184
229
|
|
|
185
230
|
- **Hide Skipped Tests on All Tests Filter**
|
|
231
|
+
|
|
186
232
|
- Skipped tests are now hidden by default when using the "All Tests" filter, providing a cleaner and more focused view of relevant tests.
|
|
187
233
|
|
|
188
234
|
- **Colorful Dashboard**
|
|
189
235
|
- We've enhanced the visual appeal of the dashboard with more vibrant and intuitive colors, making it easier to navigate and interpret results.
|
|
190
236
|
|
|
191
|
-
|
|
192
237
|
## Version 2.0.1
|
|
238
|
+
|
|
193
239
|
- Fixed local and root path issue of Parcel bundler.
|
|
194
240
|
- Local config issue
|
|
195
241
|
|
|
196
242
|
## Version 2.0.0
|
|
243
|
+
|
|
197
244
|
- Fixed local and root path issue of Parcel bundler.
|
|
198
245
|
|
|
199
246
|
## Version 1.1.9
|
|
@@ -206,9 +253,9 @@ npx ortoni-report show-report
|
|
|
206
253
|
### Command-Line Interface
|
|
207
254
|
|
|
208
255
|
- **Generate Report Command**: Added a new CLI command to generate and bundle the report:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
256
|
+
```sh
|
|
257
|
+
npx ortoni-report gr
|
|
258
|
+
```
|
|
212
259
|
This command allows users to easily generate the report with a single command.
|
|
213
260
|
|
|
214
261
|
### Enhancements
|
|
@@ -216,27 +263,31 @@ npx ortoni-report show-report
|
|
|
216
263
|
- **Bundled Report**: The generated report is now bundled into a single file, making it easier to zip and share.
|
|
217
264
|
- **Storage Location**: The bundled report is stored in the `project/ortoni-report` folder for better organization and accessibility.
|
|
218
265
|
|
|
219
|
-
|
|
220
266
|
## Version 1.1.8
|
|
221
267
|
|
|
222
268
|
### Fixed
|
|
269
|
+
|
|
223
270
|
- CSS issue
|
|
224
271
|
|
|
225
272
|
## Version 1.1.7
|
|
226
273
|
|
|
227
274
|
### Fixed
|
|
275
|
+
|
|
228
276
|
- Layout issue where the test column extends off-screen
|
|
229
|
-
- Screenshot layout of tests executed on mobile viewport
|
|
277
|
+
- Screenshot layout of tests executed on mobile viewport
|
|
230
278
|
|
|
231
279
|
### New
|
|
280
|
+
|
|
232
281
|
- Add custom project/organization logo
|
|
233
282
|
- Exception handling in `ortoni-report.ts`
|
|
234
283
|
- Added docs to the `OrtoniReportConfig`
|
|
235
284
|
|
|
236
285
|
### Improved
|
|
286
|
+
|
|
237
287
|
- Margin on Test List for better spacing
|
|
238
288
|
|
|
239
289
|
## Version 1.1.6
|
|
290
|
+
|
|
240
291
|
- Implemented debounce function to reduce search event handling frequency.
|
|
241
292
|
- Modified steps details to open only if a test has errors, enhancing UI clarity.
|
|
242
293
|
- Optimized data load by removing unnecessary inner steps, improving performance.
|
|
@@ -246,18 +297,15 @@ npx ortoni-report show-report
|
|
|
246
297
|
- Introduced user option to choose between base64 images and file path for screenshots.
|
|
247
298
|
|
|
248
299
|
## Version 1.1.5
|
|
300
|
+
|
|
249
301
|
- Added config properly to readme
|
|
250
302
|
|
|
251
303
|
## Version 1.1.4
|
|
252
304
|
|
|
253
305
|
1. **CSS Enhancement**: Updated CSS framework to Bulma for improved visualization and mobile responsiveness.
|
|
254
|
-
|
|
255
306
|
2. **Screenshots**: Implemented screenshot attachment as base64 images for enhanced report details.
|
|
256
|
-
|
|
257
307
|
3. **Toggle Theme Button**: Added a toggle theme button allowing users to switch between dark and light themes for better readability.
|
|
258
|
-
|
|
259
308
|
4. **Project Filtering**: Implemented filtering of tests by projects (e.g., chromium, firefox) to streamline test result views.
|
|
260
|
-
|
|
261
309
|
5. **Configuration Option**: Introduced `OrtoniReportConfig` for customizable report settings:
|
|
262
310
|
```typescript
|
|
263
311
|
import {OrtoniReportConfig} from "ortoni-report";
|
|
@@ -271,16 +319,17 @@ npx ortoni-report show-report
|
|
|
271
319
|
```
|
|
272
320
|
6. **Design Improvements**: Made overall design enhancements and added CSS transitions for smoother user interactions.
|
|
273
321
|
|
|
274
|
-
|
|
275
322
|
## Version 1.1.3
|
|
276
323
|
|
|
277
324
|
**New Features:**
|
|
325
|
+
|
|
278
326
|
- Added detailed steps to the testDetails section in the HTML report.
|
|
279
327
|
- Introduced a new flaky icon for better visual representation in the report.
|
|
280
328
|
- Display of test steps in the HTML report.
|
|
281
329
|
- Added a filter for retry tests to better categorize and display them.
|
|
282
330
|
|
|
283
331
|
**Improved:**
|
|
332
|
+
|
|
284
333
|
- Updated the package dependencies to remove vulnerabilities.
|
|
285
334
|
- Enhanced time formatting to include milliseconds in the duration display.
|
|
286
335
|
- Enhanced the calculation and display of the success rate in the HTML report.
|
|
@@ -288,21 +337,25 @@ npx ortoni-report show-report
|
|
|
288
337
|
## Version 1.1.2
|
|
289
338
|
|
|
290
339
|
**New Features:**
|
|
340
|
+
|
|
291
341
|
- **Ellipsis Styling for Test Names:** Long test names are now truncated with ellipsis for better readability.
|
|
292
342
|
- **Retry, Pass, Fail, and Skip Indicators:** Added visual indicators (images) to denote the status of each test, including retries.
|
|
293
343
|
- **Enhanced `msToTime` Function:** Duration now includes milliseconds for more precise time tracking.
|
|
294
344
|
- **Summary Filters:** Clicking on summary filters (passed, failed & other) to display the selected filter.
|
|
295
345
|
|
|
296
346
|
**Improvements:**
|
|
347
|
+
|
|
297
348
|
- **Unified Status Handling:** The `applyFilter` function now treats `failed` and `timedOut` statuses as the same for consistent filtering.
|
|
298
349
|
- **Date and Time Formatting:** Passed date in the format `DD-MMM-YYYY` and included time for more detailed reporting.
|
|
299
350
|
- **Success Rate and Last Run Data:** Added the ability to pass `successRate` and `lastRun` data to the `onEnd` method for comprehensive report details.
|
|
300
351
|
|
|
301
352
|
**Bug Fixes:**
|
|
353
|
+
|
|
302
354
|
- Fixed issues with conditionals in Handlebars for status checking.
|
|
303
355
|
- Improved event listener attachment for filtering and search functionalities.
|
|
304
356
|
|
|
305
357
|
**Notes:**
|
|
358
|
+
|
|
306
359
|
- Screenshot handling has been enhanced with modal dialogs, using Pico.css for styling.
|
|
307
360
|
|
|
308
361
|
This release includes several visual and functional enhancements aimed at improving the usability and readability of the Playwright test reports. The added features and improvements will help users better understand test outcomes and statuses at a glance.
|
|
@@ -310,27 +363,32 @@ This release includes several visual and functional enhancements aimed at improv
|
|
|
310
363
|
### Version 1.1.0
|
|
311
364
|
|
|
312
365
|
## New Features
|
|
366
|
+
|
|
313
367
|
- **Search Functionality:**
|
|
314
368
|
- Added a search bar to filter tests by their title.
|
|
315
369
|
- Display the relevant test name, project, and test file name while hiding others during search.
|
|
316
370
|
- Reset search form to show all tests when cleared.
|
|
317
371
|
|
|
318
|
-
## Improvements
|
|
372
|
+
## Improvements
|
|
373
|
+
|
|
319
374
|
- **Page Zoom:**
|
|
320
375
|
- Set the HTML page zoom to 90% for better display on different screen sizes.
|
|
321
376
|
|
|
322
377
|
## Bug Fixes
|
|
378
|
+
|
|
323
379
|
- **Event Listeners:**
|
|
324
380
|
- Fixed an issue where test details would not display when clicking on filtered search results.
|
|
325
381
|
- Ensured event listeners are correctly reattached after filtering search results.
|
|
326
382
|
|
|
327
383
|
## Style Adjustments
|
|
384
|
+
|
|
328
385
|
- **CSS Adjustments:**
|
|
329
386
|
- Adjusted body zoom for better overall display: `body { zoom: 0.9; }`
|
|
330
387
|
|
|
331
388
|
---
|
|
332
389
|
|
|
333
390
|
### Instructions for Users
|
|
391
|
+
|
|
334
392
|
- Use the search bar to quickly find specific tests by their title.
|
|
335
393
|
- Clear the search input to reset the view and display all tests.
|
|
336
394
|
- Note that the page zoom has been set to 90% for optimal display.
|
|
@@ -338,6 +396,7 @@ This release includes several visual and functional enhancements aimed at improv
|
|
|
338
396
|
### Version 1.0.9
|
|
339
397
|
|
|
340
398
|
**Added:**
|
|
399
|
+
|
|
341
400
|
1. Added functionality to highlight selected test result in the list
|
|
342
401
|
2. Implemented search functionality to filter test results based on user input
|
|
343
402
|
3. Added reset functionality to display all tests when the search bar is cleared
|
|
@@ -348,14 +407,16 @@ This release includes several visual and functional enhancements aimed at improv
|
|
|
348
407
|
8. Added flaky test (Retry results)
|
|
349
408
|
|
|
350
409
|
**Fixed**
|
|
410
|
+
|
|
351
411
|
1. File path based on unix/windows machine [ISSUE#1](https://github.com/ortoniKC/ortoni-report/issues/1)
|
|
352
412
|
2. Log & Error message display where it shows the actual html element
|
|
353
413
|
3. Skip test duration of 0s for the skipper test
|
|
354
414
|
4. Fixed Absolute path of test files
|
|
355
415
|
|
|
356
416
|
**Changed:**
|
|
417
|
+
|
|
357
418
|
1. Modified the `displayTestDetails` function to remove highlights when displaying test details
|
|
358
419
|
2. Updated the `searchTests` function to show all tests when the search query is empty
|
|
359
420
|
3. Improved time format to HH:MM:SS
|
|
360
421
|
|
|
361
|
-
These changes improve the user experience by allowing users to easily search for specific tests and providing visual feedback when selecting a test result from the list.
|
|
422
|
+
These changes improve the user experience by allowing users to easily search for specific tests and providing visual feedback when selecting a test result from the list.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
4
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
5
|
+
}) : x)(function(x) {
|
|
6
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
7
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
8
|
+
});
|
|
9
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
|
|
11
|
+
// src/utils/expressServer.ts
|
|
12
|
+
import express from "express";
|
|
13
|
+
import path from "path";
|
|
14
|
+
import { spawn } from "child_process";
|
|
15
|
+
function startReportServer(reportFolder, reportFilename, port = 2004, open) {
|
|
16
|
+
const app = express();
|
|
17
|
+
app.use(express.static(reportFolder));
|
|
18
|
+
app.get("/", (_req, res) => {
|
|
19
|
+
try {
|
|
20
|
+
res.sendFile(path.resolve(reportFolder, reportFilename));
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.error("Ortoni-Report: Error sending report file:", error);
|
|
23
|
+
res.status(500).send("Error loading report");
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
try {
|
|
27
|
+
const server = app.listen(port, () => {
|
|
28
|
+
console.log(
|
|
29
|
+
`Server is running at http://localhost:${port}
|
|
30
|
+
Press Ctrl+C to stop.`
|
|
31
|
+
);
|
|
32
|
+
if (open === "always" || open === "on-failure") {
|
|
33
|
+
try {
|
|
34
|
+
openBrowser(`http://localhost:${port}`);
|
|
35
|
+
} catch (error) {
|
|
36
|
+
console.error("Ortoni-Report: Error opening browser:", error);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
server.on("error", (error) => {
|
|
41
|
+
if (error.code === "EADDRINUSE") {
|
|
42
|
+
console.error(
|
|
43
|
+
`Ortoni-Report: Port ${port} is already in use. Trying a different port...`
|
|
44
|
+
);
|
|
45
|
+
} else {
|
|
46
|
+
console.error("Ortoni-Report: Server error:", error);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error("Ortoni-Report: Error starting the server:", error);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function openBrowser(url) {
|
|
54
|
+
const platform = process.platform;
|
|
55
|
+
let command;
|
|
56
|
+
try {
|
|
57
|
+
if (platform === "win32") {
|
|
58
|
+
command = "cmd";
|
|
59
|
+
spawn(command, ["/c", "start", url]);
|
|
60
|
+
} else if (platform === "darwin") {
|
|
61
|
+
command = "open";
|
|
62
|
+
spawn(command, [url]);
|
|
63
|
+
} else {
|
|
64
|
+
command = "xdg-open";
|
|
65
|
+
spawn(command, [url]);
|
|
66
|
+
}
|
|
67
|
+
} catch (error) {
|
|
68
|
+
console.error("Ortoni-Report: Error opening the browser:", error);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export {
|
|
73
|
+
__require,
|
|
74
|
+
__publicField,
|
|
75
|
+
startReportServer
|
|
76
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
|
|
5
|
+
// src/utils/expressServer.ts
|
|
6
|
+
import express from "express";
|
|
7
|
+
import path from "path";
|
|
8
|
+
import { spawn } from "child_process";
|
|
9
|
+
function startReportServer(reportFolder, reportFilename, port = 2004, open) {
|
|
10
|
+
const app = express();
|
|
11
|
+
app.use(express.static(reportFolder));
|
|
12
|
+
app.get("/", (_req, res) => {
|
|
13
|
+
try {
|
|
14
|
+
res.sendFile(path.resolve(reportFolder, reportFilename));
|
|
15
|
+
} catch (error) {
|
|
16
|
+
console.error("Ortoni-Report: Error sending report file:", error);
|
|
17
|
+
res.status(500).send("Error loading report");
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
try {
|
|
21
|
+
const server = app.listen(port, () => {
|
|
22
|
+
console.log(
|
|
23
|
+
`Server is running at http://localhost:${port}
|
|
24
|
+
Press Ctrl+C to stop.`
|
|
25
|
+
);
|
|
26
|
+
if (open === "always" || open === "on-failure") {
|
|
27
|
+
try {
|
|
28
|
+
openBrowser(`http://localhost:${port}`);
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error("Ortoni-Report: Error opening browser:", error);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
server.on("error", (error) => {
|
|
35
|
+
if (error.code === "EADDRINUSE") {
|
|
36
|
+
console.error(
|
|
37
|
+
`Ortoni-Report: Port ${port} is already in use. Trying a different port...`
|
|
38
|
+
);
|
|
39
|
+
} else {
|
|
40
|
+
console.error("Ortoni-Report: Server error:", error);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
} catch (error) {
|
|
44
|
+
console.error("Ortoni-Report: Error starting the server:", error);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function openBrowser(url) {
|
|
48
|
+
const platform = process.platform;
|
|
49
|
+
let command;
|
|
50
|
+
try {
|
|
51
|
+
if (platform === "win32") {
|
|
52
|
+
command = "cmd";
|
|
53
|
+
spawn(command, ["/c", "start", url]);
|
|
54
|
+
} else if (platform === "darwin") {
|
|
55
|
+
command = "open";
|
|
56
|
+
spawn(command, [url]);
|
|
57
|
+
} else {
|
|
58
|
+
command = "xdg-open";
|
|
59
|
+
spawn(command, [url]);
|
|
60
|
+
}
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error("Ortoni-Report: Error opening the browser:", error);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
__publicField,
|
|
68
|
+
startReportServer
|
|
69
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
// src/utils/expressServer.ts
|
|
9
|
+
import express from "express";
|
|
10
|
+
import path from "path";
|
|
11
|
+
import { spawn } from "child_process";
|
|
12
|
+
function startReportServer(reportFolder, reportFilename, port = 2004, open) {
|
|
13
|
+
const app = express();
|
|
14
|
+
app.use(express.static(reportFolder));
|
|
15
|
+
app.get("/", (_req, res) => {
|
|
16
|
+
try {
|
|
17
|
+
res.sendFile(path.resolve(reportFolder, reportFilename));
|
|
18
|
+
} catch (error) {
|
|
19
|
+
console.error("Ortoni-Report: Error sending report file:", error);
|
|
20
|
+
res.status(500).send("Error loading report");
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
try {
|
|
24
|
+
const server = app.listen(port, () => {
|
|
25
|
+
console.log(
|
|
26
|
+
`Server is running at http://localhost:${port}
|
|
27
|
+
Press Ctrl+C to stop.`
|
|
28
|
+
);
|
|
29
|
+
if (open === "always" || open === "on-failure") {
|
|
30
|
+
try {
|
|
31
|
+
openBrowser(`http://localhost:${port}`);
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error("Ortoni-Report: Error opening browser:", error);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
server.on("error", (error) => {
|
|
38
|
+
if (error.code === "EADDRINUSE") {
|
|
39
|
+
console.error(
|
|
40
|
+
`Ortoni-Report: Port ${port} is already in use. Trying a different port...`
|
|
41
|
+
);
|
|
42
|
+
} else {
|
|
43
|
+
console.error("Ortoni-Report: Server error:", error);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.error("Ortoni-Report: Error starting the server:", error);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function openBrowser(url) {
|
|
51
|
+
const platform = process.platform;
|
|
52
|
+
let command;
|
|
53
|
+
try {
|
|
54
|
+
if (platform === "win32") {
|
|
55
|
+
command = "cmd";
|
|
56
|
+
spawn(command, ["/c", "start", url]);
|
|
57
|
+
} else if (platform === "darwin") {
|
|
58
|
+
command = "open";
|
|
59
|
+
spawn(command, [url]);
|
|
60
|
+
} else {
|
|
61
|
+
command = "xdg-open";
|
|
62
|
+
spawn(command, [url]);
|
|
63
|
+
}
|
|
64
|
+
} catch (error) {
|
|
65
|
+
console.error("Ortoni-Report: Error opening the browser:", error);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export {
|
|
70
|
+
__require,
|
|
71
|
+
startReportServer
|
|
72
|
+
};
|
package/dist/cli/cli.js
CHANGED
|
@@ -43,8 +43,10 @@ function startReportServer(reportFolder, reportFilename, port = 2004, open) {
|
|
|
43
43
|
});
|
|
44
44
|
try {
|
|
45
45
|
const server = app.listen(port, () => {
|
|
46
|
-
console.log(
|
|
47
|
-
|
|
46
|
+
console.log(
|
|
47
|
+
`Server is running at http://localhost:${port}
|
|
48
|
+
Press Ctrl+C to stop.`
|
|
49
|
+
);
|
|
48
50
|
if (open === "always" || open === "on-failure") {
|
|
49
51
|
try {
|
|
50
52
|
openBrowser(`http://localhost:${port}`);
|
|
@@ -55,7 +57,9 @@ Press Ctrl+C to stop.`);
|
|
|
55
57
|
});
|
|
56
58
|
server.on("error", (error) => {
|
|
57
59
|
if (error.code === "EADDRINUSE") {
|
|
58
|
-
console.error(
|
|
60
|
+
console.error(
|
|
61
|
+
`Ortoni-Report: Port ${port} is already in use. Trying a different port...`
|
|
62
|
+
);
|
|
59
63
|
} else {
|
|
60
64
|
console.error("Ortoni-Report: Server error:", error);
|
|
61
65
|
}
|
package/dist/cli/cli.mjs
CHANGED
package/dist/ortoni-report.d.mts
CHANGED
|
@@ -105,6 +105,7 @@ declare class OrtoniReport implements Reporter {
|
|
|
105
105
|
private dbManager;
|
|
106
106
|
private shouldGenerateReport;
|
|
107
107
|
private showConsoleLogs;
|
|
108
|
+
private skipTraceViewer;
|
|
108
109
|
constructor(ortoniConfig?: OrtoniReportConfig);
|
|
109
110
|
private reportsCount;
|
|
110
111
|
onBegin(config: FullConfig, _suite: Suite): Promise<void>;
|