html-reporter 10.4.0 → 10.5.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 (43) hide show
  1. package/build/lib/adapters/test-result/testplane.js +1 -1
  2. package/build/lib/adapters/test-result/testplane.js.map +1 -1
  3. package/build/lib/adapters/tool/testplane/index.d.ts +1 -1
  4. package/build/lib/adapters/tool/testplane/index.js +28 -7
  5. package/build/lib/adapters/tool/testplane/index.js.map +1 -1
  6. package/build/lib/common-utils.d.ts +2 -0
  7. package/build/lib/common-utils.js +6 -2
  8. package/build/lib/common-utils.js.map +1 -1
  9. package/build/lib/config/index.js +36 -0
  10. package/build/lib/config/index.js.map +1 -1
  11. package/build/lib/constants/checked-statuses.d.ts +10 -3
  12. package/build/lib/constants/checked-statuses.js +10 -5
  13. package/build/lib/constants/checked-statuses.js.map +1 -1
  14. package/build/lib/constants/defaults.js +8 -0
  15. package/build/lib/constants/defaults.js.map +1 -1
  16. package/build/lib/constants/expand-modes.d.ts +4 -4
  17. package/build/lib/constants/expand-modes.js +6 -6
  18. package/build/lib/constants/expand-modes.js.map +1 -1
  19. package/build/lib/constants/test-statuses.d.ts +17 -1
  20. package/build/lib/constants/test-statuses.js +17 -1
  21. package/build/lib/constants/test-statuses.js.map +1 -1
  22. package/build/lib/constants/view-modes.d.ts +3 -1
  23. package/build/lib/constants/view-modes.js +2 -0
  24. package/build/lib/constants/view-modes.js.map +1 -1
  25. package/build/lib/db-utils/client.d.ts +5 -1
  26. package/build/lib/db-utils/client.js +53 -17
  27. package/build/lib/db-utils/client.js.map +1 -1
  28. package/build/lib/history-utils.d.ts +4 -0
  29. package/build/lib/history-utils.js +7 -4
  30. package/build/lib/history-utils.js.map +1 -1
  31. package/build/lib/report-builder/gui.d.ts +2 -1
  32. package/build/lib/report-builder/gui.js +5 -2
  33. package/build/lib/report-builder/gui.js.map +1 -1
  34. package/build/lib/server-utils.d.ts +1 -0
  35. package/build/lib/server-utils.js +6 -2
  36. package/build/lib/server-utils.js.map +1 -1
  37. package/build/lib/static/gui.min.css +10 -10
  38. package/build/lib/static/gui.min.js +1 -1
  39. package/build/lib/static/report.min.css +9 -9
  40. package/build/lib/static/report.min.js +1 -1
  41. package/build/lib/types.d.ts +26 -0
  42. package/build/package.json +7 -3
  43. package/package.json +7 -3
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ import type axios from 'axios';
2
3
  import type { LooksSameOptions, CoordBounds } from 'looks-same';
3
4
  import type { default as Testplane, TestResult } from 'testplane';
4
5
  import { DiffModeId, SaveFormat, SUITES_TABLE_COLUMNS, TestStatus, ViewMode } from './constants';
@@ -177,6 +178,30 @@ export interface CustomGuiItem {
177
178
  control: object;
178
179
  }) => void | Promise<void>;
179
180
  }
181
+ type AxiosPost = typeof axios['post'];
182
+ type AxiosRequestOptions = Parameters<AxiosPost>[2];
183
+ export interface StaticImageAccepterConfig {
184
+ enabled: boolean;
185
+ repositoryUrl: string;
186
+ pullRequestUrl: string;
187
+ serviceUrl: string;
188
+ axiosRequestOptions?: AxiosRequestOptions;
189
+ meta: Record<string, unknown>;
190
+ }
191
+ export interface StaticImageAccepterRequest extends Pick<StaticImageAccepterConfig, 'repositoryUrl' | 'pullRequestUrl'> {
192
+ message: string;
193
+ meta?: StaticImageAccepterConfig['meta'];
194
+ imagesInfo: Array<{
195
+ /**
196
+ * @note base64
197
+ */
198
+ image: string;
199
+ /**
200
+ * @note relative to repository root
201
+ */
202
+ path: string;
203
+ }>;
204
+ }
180
205
  export interface ReporterConfig {
181
206
  baseHost: string;
182
207
  commandsWithShortHistory: string[];
@@ -196,6 +221,7 @@ export interface ReporterConfig {
196
221
  yandexMetrika: {
197
222
  counterNumber: null | number;
198
223
  };
224
+ staticImageAccepter: StaticImageAccepterConfig;
199
225
  }
200
226
  export type ReporterOptions = Omit<ReporterConfig, 'errorPatterns'> & {
201
227
  errorPatterns: (string | ErrorPattern)[];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-reporter",
3
- "version": "10.4.0",
3
+ "version": "10.5.0",
4
4
  "description": "Html-reporter and GUI for viewing and managing results of a tests run. Currently supports Testplane and Hermione.",
5
5
  "files": [
6
6
  "build"
@@ -67,7 +67,8 @@
67
67
  "license": "MIT",
68
68
  "peerDependencies": {
69
69
  "hermione": ">=8.0.0",
70
- "testplane": "*"
70
+ "testplane": "*",
71
+ "playwright": "*"
71
72
  },
72
73
  "peerDependenciesMeta": {
73
74
  "hermione": {
@@ -75,6 +76,9 @@
75
76
  },
76
77
  "testplane": {
77
78
  "optional": true
79
+ },
80
+ "playwright": {
81
+ "optional": true
78
82
  }
79
83
  },
80
84
  "dependencies": {
@@ -119,6 +123,7 @@
119
123
  "@babel/preset-react": "^7.22.5",
120
124
  "@babel/preset-typescript": "^7.22.5",
121
125
  "@gemini-testing/commander": "^2.15.3",
126
+ "@gravity-ui/components": "^3.7.0",
122
127
  "@gravity-ui/uikit": "^6.20.0",
123
128
  "@playwright/test": "^1.44.1",
124
129
  "@swc/core": "^1.3.64",
@@ -225,7 +230,6 @@
225
230
  "ts-node": "^10.9.1",
226
231
  "type-fest": "^3.13.1",
227
232
  "typescript": "^5.0.4",
228
- "uglify-js": "^3.17.4",
229
233
  "web-vitals": "^1.1.2",
230
234
  "webpack": "^5.89.0",
231
235
  "webpack-cli": "^5.1.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-reporter",
3
- "version": "10.4.0",
3
+ "version": "10.5.0",
4
4
  "description": "Html-reporter and GUI for viewing and managing results of a tests run. Currently supports Testplane and Hermione.",
5
5
  "files": [
6
6
  "build"
@@ -67,7 +67,8 @@
67
67
  "license": "MIT",
68
68
  "peerDependencies": {
69
69
  "hermione": ">=8.0.0",
70
- "testplane": "*"
70
+ "testplane": "*",
71
+ "playwright": "*"
71
72
  },
72
73
  "peerDependenciesMeta": {
73
74
  "hermione": {
@@ -75,6 +76,9 @@
75
76
  },
76
77
  "testplane": {
77
78
  "optional": true
79
+ },
80
+ "playwright": {
81
+ "optional": true
78
82
  }
79
83
  },
80
84
  "dependencies": {
@@ -119,6 +123,7 @@
119
123
  "@babel/preset-react": "^7.22.5",
120
124
  "@babel/preset-typescript": "^7.22.5",
121
125
  "@gemini-testing/commander": "^2.15.3",
126
+ "@gravity-ui/components": "^3.7.0",
122
127
  "@gravity-ui/uikit": "^6.20.0",
123
128
  "@playwright/test": "^1.44.1",
124
129
  "@swc/core": "^1.3.64",
@@ -225,7 +230,6 @@
225
230
  "ts-node": "^10.9.1",
226
231
  "type-fest": "^3.13.1",
227
232
  "typescript": "^5.0.4",
228
- "uglify-js": "^3.17.4",
229
233
  "web-vitals": "^1.1.2",
230
234
  "webpack": "^5.89.0",
231
235
  "webpack-cli": "^5.1.4",