html-reporter 8.1.0 → 8.4.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 (39) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +44 -7
  3. package/lib/cli-commands/index.js +2 -1
  4. package/lib/cli-commands/remove-unused-screens/index.js +194 -0
  5. package/lib/cli-commands/remove-unused-screens/utils.js +159 -0
  6. package/lib/common-utils.js +52 -52
  7. package/lib/config/index.js +1 -1
  8. package/lib/constants/database.js +24 -4
  9. package/lib/db-utils/client.js +109 -0
  10. package/lib/db-utils/common.js +76 -0
  11. package/lib/db-utils/server.js +124 -0
  12. package/lib/gui/index.js +2 -1
  13. package/lib/gui/server.js +2 -1
  14. package/lib/gui/tool-runner/index.js +7 -7
  15. package/lib/gui/tool-runner/utils.js +10 -27
  16. package/lib/plugin-adapter.js +1 -1
  17. package/lib/plugin-api.js +21 -3
  18. package/lib/report-builder/static.js +1 -1
  19. package/lib/server-utils.js +1 -4
  20. package/lib/sqlite-adapter.js +3 -4
  21. package/lib/static/components/section/body/meta-info.js +1 -1
  22. package/lib/static/components/state/screenshot.js +1 -1
  23. package/lib/static/gui.min.css +1 -0
  24. package/lib/static/gui.min.js +27 -41
  25. package/lib/static/modules/actions.js +2 -3
  26. package/lib/static/modules/reducers/db.js +1 -1
  27. package/lib/static/modules/utils.js +0 -12
  28. package/lib/static/report.min.css +1 -0
  29. package/lib/static/report.min.js +27 -41
  30. package/lib/test-adapter.js +2 -1
  31. package/lib/tests-tree-builder/static.js +13 -13
  32. package/package.json +6 -1
  33. package/lib/constants/file-names.js +0 -6
  34. package/lib/static/data.js +0 -611
  35. package/lib/static/databaseUrls.json +0 -1
  36. package/lib/static/modules/database-utils.js +0 -36
  37. package/lib/static/modules/sqlite.js +0 -152
  38. package/lib/static/sql-wasm.js +0 -215
  39. package/sqlite.db +0 -0
@@ -13,6 +13,7 @@ const {getCommandsHistory} = require('./history-utils');
13
13
  const {SUCCESS, FAIL, ERROR, UPDATED} = require('./constants/test-statuses');
14
14
  const {ERROR_DETAILS_PATH} = require('./constants/paths');
15
15
  const utils = require('./server-utils');
16
+ const {logger} = require('./common-utils');
16
17
 
17
18
  const globalCacheAllImages = new Map();
18
19
 
@@ -125,7 +126,7 @@ module.exports = class TestAdapter {
125
126
 
126
127
  async saveBase64Screenshot(reportPath) {
127
128
  if (!this.screenshot.base64) {
128
- utils.logger.warn('Cannot save screenshot on reject');
129
+ logger.warn('Cannot save screenshot on reject');
129
130
 
130
131
  return Promise.resolve();
131
132
  }
@@ -2,9 +2,9 @@
2
2
 
3
3
  const _ = require('lodash');
4
4
  const BaseTestsTreeBuilder = require('./base');
5
- const {dbColumnIndexes} = require('../common-utils');
6
5
  const testStatus = require('../constants/test-statuses');
7
6
  const {versions: browserVersions} = require('../constants/browser');
7
+ const {DB_COLUMN_INDEXES} = require('../constants/database');
8
8
 
9
9
  module.exports = class StaticTestsTreeBuilder extends BaseTestsTreeBuilder {
10
10
  constructor() {
@@ -25,8 +25,8 @@ module.exports = class StaticTestsTreeBuilder extends BaseTestsTreeBuilder {
25
25
  const browsers = {};
26
26
 
27
27
  for (const row of rows) {
28
- const testPath = JSON.parse(row[dbColumnIndexes.suitePath]);
29
- const browserName = row[dbColumnIndexes.name];
28
+ const testPath = JSON.parse(row[DB_COLUMN_INDEXES.suitePath]);
29
+ const browserName = row[DB_COLUMN_INDEXES.name];
30
30
 
31
31
  const testId = this._buildId(testPath);
32
32
  const browserId = this._buildId(testId, browserName);
@@ -151,16 +151,16 @@ function initStats() {
151
151
 
152
152
  function mkTestResult(row, data = {}) {
153
153
  return {
154
- description: row[dbColumnIndexes.description],
155
- imagesInfo: JSON.parse(row[dbColumnIndexes.imagesInfo]),
156
- metaInfo: JSON.parse(row[dbColumnIndexes.metaInfo]),
157
- multipleTabs: Boolean(row[dbColumnIndexes.multipleTabs]),
158
- name: row[dbColumnIndexes.name],
159
- screenshot: Boolean(row[dbColumnIndexes.screenshot]),
160
- status: row[dbColumnIndexes.status],
161
- suiteUrl: row[dbColumnIndexes.suiteUrl],
162
- skipReason: row[dbColumnIndexes.skipReason],
163
- error: JSON.parse(row[dbColumnIndexes.error]),
154
+ description: row[DB_COLUMN_INDEXES.description],
155
+ imagesInfo: JSON.parse(row[DB_COLUMN_INDEXES.imagesInfo]),
156
+ metaInfo: JSON.parse(row[DB_COLUMN_INDEXES.metaInfo]),
157
+ multipleTabs: Boolean(row[DB_COLUMN_INDEXES.multipleTabs]),
158
+ name: row[DB_COLUMN_INDEXES.name],
159
+ screenshot: Boolean(row[DB_COLUMN_INDEXES.screenshot]),
160
+ status: row[DB_COLUMN_INDEXES.status],
161
+ suiteUrl: row[DB_COLUMN_INDEXES.suiteUrl],
162
+ skipReason: row[DB_COLUMN_INDEXES.skipReason],
163
+ error: JSON.parse(row[DB_COLUMN_INDEXES.error]),
164
164
  ...data
165
165
  };
166
166
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-reporter",
3
- "version": "8.1.0",
3
+ "version": "8.4.0",
4
4
  "description": "Plugin for hermione which is intended to aggregate the results of tests running into html report",
5
5
  "scripts": {
6
6
  "coverage": "nyc npm run test-unit",
@@ -51,16 +51,20 @@
51
51
  "chalk": "^1.1.3",
52
52
  "debug": "^4.1.1",
53
53
  "express": "^4.16.2",
54
+ "filesize": "^8.0.6",
54
55
  "fs-extra": "^7.0.1",
55
56
  "gemini-configparser": "^1.0.0",
56
57
  "gemini-core": "^6.3.2",
57
58
  "http-codes": "1.0.0",
58
59
  "immer": "^7.0.7",
60
+ "inquirer": "^8.2.0",
59
61
  "json-stringify-safe": "^5.0.1",
60
62
  "lodash": "^4.17.4",
61
63
  "looks-same": "^7.1.1",
64
+ "micromatch": "^4.0.4",
62
65
  "nested-error-stacks": "^2.1.0",
63
66
  "opener": "^1.4.3",
67
+ "ora": "^5.4.1",
64
68
  "p-queue": "^5.0.0",
65
69
  "qs": "^6.9.1",
66
70
  "react-hotkeys": "^2.0.0",
@@ -79,6 +83,7 @@
79
83
  "web-vitals": "^1.1.2"
80
84
  },
81
85
  "devDependencies": {
86
+ "@gemini-testing/commander": "^2.15.3",
82
87
  "app-module-path": "^2.2.0",
83
88
  "babel-core": "^6.26.0",
84
89
  "babel-eslint": "^8.0.1",
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- LOCAL_DATABASE_NAME: 'sqlite.db',
5
- DATABASE_URLS_JSON_NAME: 'databaseUrls.json'
6
- };