html-reporter 7.1.0 → 7.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.
- package/CHANGELOG.md +48 -0
- package/README.md +44 -10
- package/lib/common-utils.js +14 -14
- package/lib/config/index.js +11 -7
- package/lib/constants/defaults.js +1 -1
- package/lib/constants/expand-modes.js +8 -0
- package/lib/constants/extension-points.js +1 -0
- package/lib/constants/plugin-events.js +10 -0
- package/lib/gui/constants/client-events.js +2 -4
- package/lib/gui/server.js +1 -4
- package/lib/gui/tool-runner/index.js +4 -2
- package/lib/gui/tool-runner/utils.js +4 -20
- package/lib/plugin-api.js +14 -1
- package/lib/report-builder/static.js +1 -0
- package/lib/server-utils.js +0 -1
- package/lib/sqlite-adapter.js +4 -1
- package/lib/static/components/controls/common-controls.js +5 -9
- package/lib/static/components/error-groups/item.js +12 -17
- package/lib/static/components/error-groups/list.js +45 -18
- package/lib/static/components/gui.js +10 -1
- package/lib/static/components/report.js +6 -1
- package/lib/static/components/section/body/index.js +14 -40
- package/lib/static/components/section/body/result.js +5 -1
- package/lib/static/components/section/section-browser.js +13 -53
- package/lib/static/components/section/section-common.js +23 -88
- package/lib/static/components/section/section-wrapper.js +2 -15
- package/lib/static/components/section/title/browser.js +2 -1
- package/lib/static/components/state/index.js +14 -82
- package/lib/static/components/state/screenshot.js +6 -22
- package/lib/static/components/state/state-error.js +1 -1
- package/lib/static/components/suites.js +100 -28
- package/lib/static/gui.html +1 -1
- package/lib/static/gui.min.css +1 -1
- package/lib/static/gui.min.js +23 -15
- package/lib/static/modules/action-names.js +3 -2
- package/lib/static/modules/actions.js +20 -31
- package/lib/static/modules/default-state.js +2 -1
- package/lib/static/modules/group-errors.js +3 -3
- package/lib/static/modules/middlewares/local-storage.js +0 -2
- package/lib/static/modules/middlewares/metrika.js +1 -6
- package/lib/static/modules/reducers/db.js +4 -2
- package/lib/static/modules/reducers/tree/helpers.js +28 -0
- package/lib/static/modules/reducers/tree/index.js +241 -0
- package/lib/static/modules/reducers/tree/nodes/browsers.js +99 -0
- package/lib/static/modules/reducers/tree/nodes/images.js +50 -0
- package/lib/static/modules/reducers/tree/nodes/results.js +13 -0
- package/lib/static/modules/reducers/tree/nodes/suites.js +217 -0
- package/lib/static/modules/reducers/view.js +7 -11
- package/lib/static/modules/selectors/tree.js +98 -145
- package/lib/static/modules/sqlite.js +20 -15
- package/lib/static/modules/utils.js +58 -10
- package/lib/static/report.min.css +1 -1
- package/lib/static/report.min.js +23 -15
- package/lib/static/styles.css +4 -8
- package/package.json +6 -6
- package/webpack.common.js +5 -0
- package/lib/constants/client-events.js +0 -6
- package/lib/static/components/state/placeholder.js +0 -10
- package/lib/static/modules/reducers/tree.js +0 -169
- package/sqlite.db +0 -0
package/lib/static/styles.css
CHANGED
|
@@ -350,6 +350,10 @@ main.container {
|
|
|
350
350
|
white-space: nowrap;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
+
.sections_type_empty {
|
|
354
|
+
margin-top: 10px;
|
|
355
|
+
}
|
|
356
|
+
|
|
353
357
|
.section {
|
|
354
358
|
margin-top: 10px;
|
|
355
359
|
}
|
|
@@ -832,14 +836,6 @@ a:active {
|
|
|
832
836
|
text-transform: uppercase;
|
|
833
837
|
}
|
|
834
838
|
|
|
835
|
-
.image-box__placeholder {
|
|
836
|
-
position: relative;
|
|
837
|
-
display: table-cell;
|
|
838
|
-
max-width: 100%;
|
|
839
|
-
height: 0;
|
|
840
|
-
background: #fff;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
839
|
@-webkit-keyframes scale {
|
|
844
840
|
0% {
|
|
845
841
|
-webkit-transform: scale(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-reporter",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.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",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"clean-fixtures": "rimraf test/func/fixtures/report",
|
|
18
18
|
"precommit": "npm run lint",
|
|
19
19
|
"prepublish": "cross-env NODE_ENV=production webpack --config=webpack.prod.js",
|
|
20
|
-
"start": "webpack-dev-server --config=webpack.dev.js --progress --colors --hot --inline",
|
|
20
|
+
"start": "NODE_ENV=development webpack-dev-server --config=webpack.dev.js --progress --colors --hot --inline",
|
|
21
21
|
"commitmsg": "conventional-changelog-lint -e",
|
|
22
22
|
"release": "standard-version",
|
|
23
|
-
"watch": "webpack --progress -d --config=webpack.dev.js --watch"
|
|
23
|
+
"watch": "NODE_ENV=development webpack --progress -d --config=webpack.dev.js --watch"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"express": "^4.16.2",
|
|
54
54
|
"fs-extra": "^7.0.1",
|
|
55
55
|
"gemini-configparser": "^1.0.0",
|
|
56
|
-
"gemini-core": "^6.
|
|
56
|
+
"gemini-core": "^6.3.2",
|
|
57
57
|
"http-codes": "1.0.0",
|
|
58
58
|
"immer": "^7.0.7",
|
|
59
59
|
"json-stringify-safe": "^5.0.1",
|
|
@@ -79,8 +79,6 @@
|
|
|
79
79
|
"web-vitals": "^1.1.2"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@gemini-testing/react-lazily-render": "^1.2.1",
|
|
83
|
-
"@gemini-testing/react-lazyload": "^2.3.2",
|
|
84
82
|
"app-module-path": "^2.2.0",
|
|
85
83
|
"babel-core": "^6.26.0",
|
|
86
84
|
"babel-eslint": "^8.0.1",
|
|
@@ -129,11 +127,13 @@
|
|
|
129
127
|
"prop-types": "^15.6.0",
|
|
130
128
|
"proxyquire": "^1.7.11",
|
|
131
129
|
"raf": "^3.4.0",
|
|
130
|
+
"rc-resize-observer": "^1.0.0",
|
|
132
131
|
"rc-tree-select": "^3.1.3",
|
|
133
132
|
"react": "^16.13.1",
|
|
134
133
|
"react-clipboard.js": "^1.1.2",
|
|
135
134
|
"react-dom": "^16.13.1",
|
|
136
135
|
"react-redux": "^7.2.1",
|
|
136
|
+
"react-virtualized": "^9.22.3",
|
|
137
137
|
"redux": "^4.0.5",
|
|
138
138
|
"redux-logger": "^3.0.6",
|
|
139
139
|
"redux-mock-store": "^1.5.1",
|
package/webpack.common.js
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {Loader} from 'semantic-ui-react';
|
|
3
|
-
|
|
4
|
-
export default function Placeholder({width, paddingTop}) {
|
|
5
|
-
return (
|
|
6
|
-
<div className="image-box__placeholder" style={{width, paddingTop}}>
|
|
7
|
-
<Loader active content='Loading' />
|
|
8
|
-
</div>
|
|
9
|
-
);
|
|
10
|
-
}
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import _ from 'lodash';
|
|
2
|
-
import {produce} from 'immer';
|
|
3
|
-
import actionNames from '../action-names';
|
|
4
|
-
import {isSuiteFailed} from '../utils';
|
|
5
|
-
import {determineStatus} from '../../../common-utils';
|
|
6
|
-
|
|
7
|
-
export default produce((state, action) => {
|
|
8
|
-
switch (action.type) {
|
|
9
|
-
case actionNames.INIT_GUI_REPORT:
|
|
10
|
-
case actionNames.INIT_STATIC_REPORT: {
|
|
11
|
-
const {tree} = action.payload;
|
|
12
|
-
|
|
13
|
-
state.tree = tree;
|
|
14
|
-
state.tree.suites.failedRootIds = getFailedRootSuiteIds(tree.suites);
|
|
15
|
-
|
|
16
|
-
state.tree.browsers.stateById = {};
|
|
17
|
-
state.tree.images.stateById = {};
|
|
18
|
-
|
|
19
|
-
const filteredBrowsers = state.view.filteredBrowsers;
|
|
20
|
-
updateAllSuitesStatus(state, filteredBrowsers);
|
|
21
|
-
|
|
22
|
-
break;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
case actionNames.RUN_ALL_TESTS: {
|
|
26
|
-
const {status} = action.payload;
|
|
27
|
-
|
|
28
|
-
state.tree.suites.allIds.forEach((suiteId) => {
|
|
29
|
-
state.tree.suites.byId[suiteId].status = status;
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
case actionNames.SUITE_BEGIN: {
|
|
36
|
-
const {suiteId, status} = action.payload;
|
|
37
|
-
|
|
38
|
-
state.tree.suites.byId[suiteId].status = status;
|
|
39
|
-
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
case actionNames.TEST_BEGIN:
|
|
44
|
-
case actionNames.TEST_RESULT:
|
|
45
|
-
case actionNames.ACCEPT_OPENED_SCREENSHOTS:
|
|
46
|
-
case actionNames.ACCEPT_SCREENSHOT: {
|
|
47
|
-
[].concat(action.payload).forEach(({result, images, suites}) => {
|
|
48
|
-
state.tree.results.byId[result.id] = result;
|
|
49
|
-
if (!state.tree.results.allIds.includes(result.id)) {
|
|
50
|
-
state.tree.results.allIds.push(result.id);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
images.forEach((image) => {
|
|
54
|
-
state.tree.images.byId[image.id] = image;
|
|
55
|
-
if (!state.tree.images.allIds.includes(image.id)) {
|
|
56
|
-
state.tree.images.allIds.push(image.id);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
if (!state.tree.browsers.byId[result.parentId].resultIds.includes(result.id)) {
|
|
61
|
-
state.tree.browsers.byId[result.parentId].resultIds.push(result.id);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
suites.forEach(({id, status}) => {
|
|
65
|
-
state.tree.suites.byId[id].status = status;
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
state.tree.suites.failedRootIds = getFailedRootSuiteIds(state.tree.suites);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
break;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
case actionNames.CHANGE_TEST_RETRY: {
|
|
75
|
-
const {browserId, retryIndex} = action.payload;
|
|
76
|
-
|
|
77
|
-
if (!state.tree.browsers.stateById[browserId]) {
|
|
78
|
-
state.tree.browsers.stateById[browserId] = {retryIndex};
|
|
79
|
-
} else {
|
|
80
|
-
state.tree.browsers.stateById[browserId].retryIndex = retryIndex;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
case actionNames.TOGGLE_STATE_RESULT: {
|
|
87
|
-
const {imageId, opened} = action.payload;
|
|
88
|
-
|
|
89
|
-
if (!state.tree.images.stateById[imageId]) {
|
|
90
|
-
state.tree.images.stateById[imageId] = {opened};
|
|
91
|
-
} else {
|
|
92
|
-
state.tree.images.stateById[imageId].opened = opened;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
case actionNames.BROWSERS_SELECTED: {
|
|
99
|
-
const filteredBrowsers = action.payload.browsers;
|
|
100
|
-
|
|
101
|
-
updateAllSuitesStatus(state, filteredBrowsers);
|
|
102
|
-
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
function getFailedRootSuiteIds(suites) {
|
|
109
|
-
return suites.allRootIds.filter((rootId) => {
|
|
110
|
-
return isSuiteFailed(suites.byId[rootId]);
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function getChildSuitesStatus(state, suite, filteredBrowsers) {
|
|
115
|
-
let childStatuses = [];
|
|
116
|
-
|
|
117
|
-
if (suite.suiteIds) {
|
|
118
|
-
childStatuses = suite.suiteIds.map((id) => state.tree.suites.byId[id].status);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (suite.browserIds) {
|
|
122
|
-
const suiteBrowsers = suite.browserIds
|
|
123
|
-
.map((id) => state.tree.browsers.byId[id])
|
|
124
|
-
.filter(({name, version}) => {
|
|
125
|
-
var res = filteredBrowsers.some(({id: filteredName, versions: filteredVersions}) => {
|
|
126
|
-
return filteredName === name && (filteredVersions.includes(version) || !filteredVersions.length);
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
return res;
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
const suiteBrowserStatuses = suiteBrowsers.map(({resultIds}) => state.tree.results.byId[_.last(resultIds)].status);
|
|
133
|
-
childStatuses = childStatuses.concat(suiteBrowserStatuses);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
return determineStatus(childStatuses);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function updateAllSuitesStatus(state, filteredBrowsers) {
|
|
140
|
-
const childSuitesIds = _(state.tree.browsers.allIds)
|
|
141
|
-
.map((browserId) => state.tree.browsers.byId[browserId].parentId)
|
|
142
|
-
.uniq()
|
|
143
|
-
.value();
|
|
144
|
-
|
|
145
|
-
return updateSuitesStatus(state, childSuitesIds, filteredBrowsers);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function updateSuitesStatus(state, suitesIds = [], filteredBrowsers) {
|
|
149
|
-
if (!suitesIds || !suitesIds.length) {
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
const suites = [].concat(suitesIds).map((id) => state.tree.suites.byId[id]);
|
|
154
|
-
const parentsToUpdate = new Set();
|
|
155
|
-
|
|
156
|
-
suites.forEach((s) => {
|
|
157
|
-
const newStatus = getChildSuitesStatus(state, s, filteredBrowsers);
|
|
158
|
-
if (newStatus === s.status) {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
s.status = newStatus;
|
|
163
|
-
if (s.parentId) {
|
|
164
|
-
parentsToUpdate.add(s.parentId);
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
updateSuitesStatus(state, Array.from(parentsToUpdate), filteredBrowsers);
|
|
169
|
-
}
|
package/sqlite.db
DELETED
|
Binary file
|