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
@@ -6,8 +6,7 @@ import actionNames from './action-names';
6
6
  import {types as modalTypes} from '../components/modals';
7
7
  import {QUEUED} from '../../constants/test-statuses';
8
8
  import {getHttpErrorMessage} from './utils';
9
- import {fetchDatabases, mergeDatabases, connectToDatabase, getMainDatabaseUrl} from './sqlite';
10
- import {getSuitesTableRows} from './database-utils';
9
+ import {fetchDataFromDatabases, mergeDatabases, connectToDatabase, getMainDatabaseUrl, getSuitesTableRows} from '../../db-utils/client';
11
10
  import {setFilteredBrowsers} from './query-params';
12
11
  import plugins from './plugins';
13
12
 
@@ -52,7 +51,7 @@ export const initStaticReport = () => {
52
51
 
53
52
  try {
54
53
  const mainDatabaseUrls = new URL('databaseUrls.json', window.location.href);
55
- const fetchDbResponses = await fetchDatabases([mainDatabaseUrls.href]);
54
+ const fetchDbResponses = await fetchDataFromDatabases([mainDatabaseUrls.href]);
56
55
 
57
56
  fetchDbDetails = fetchDbResponses.map(({url, status, data}) => ({url, status, success: !!data}));
58
57
 
@@ -1,4 +1,4 @@
1
- import {closeDatabase} from '../database-utils';
1
+ import {closeDatabase} from '../../../db-utils/client';
2
2
  import actionNames from '../action-names';
3
3
 
4
4
  export default (state, action) => {
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const url = require('url');
4
3
  const {get, isEmpty, find, isFunction, flatMap} = require('lodash');
5
4
  const {isIdleStatus, isSuccessStatus, isUpdatedStatus, isFailStatus, isErroredStatus, isSkippedStatus} = require('../../common-utils');
6
5
  const {getCommonErrors} = require('../../constants/errors');
@@ -60,16 +59,6 @@ function dateToLocaleString(date) {
60
59
  return new Date(date).toLocaleString(lang);
61
60
  }
62
61
 
63
- function isUrl(str) {
64
- if (typeof str !== 'string') {
65
- return false;
66
- }
67
-
68
- const parsedUrl = url.parse(str);
69
-
70
- return parsedUrl.host && parsedUrl.protocol;
71
- }
72
-
73
62
  function getHttpErrorMessage(error) {
74
63
  const {message, response} = error;
75
64
 
@@ -146,7 +135,6 @@ module.exports = {
146
135
  isNodeSuccessful,
147
136
  isAcceptable,
148
137
  dateToLocaleString,
149
- isUrl,
150
138
  getHttpErrorMessage,
151
139
  isTestNameMatchFilters,
152
140
  isStatusMatchViewMode,
@@ -430,6 +430,7 @@
430
430
  vertical-align: top;
431
431
  }
432
432
  .rc-tree-select-tree-indent-unit {
433
+ width: 16px;
433
434
  display: inline-block;
434
435
  padding-left: 18px;
435
436
  }