html-reporter 8.4.3 → 9.1.1
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 +35 -0
- package/README.md +33 -1
- package/lib/config/index.js +17 -6
- package/lib/constants/defaults.js +2 -1
- package/lib/constants/diff-modes.js +32 -0
- package/lib/constants/plugin-events.js +2 -1
- package/lib/server-utils.js +1 -1
- package/lib/static/components/controls/common-controls.js +17 -15
- package/lib/static/components/controls/control-select/index.js +50 -0
- package/lib/static/components/controls/control-select/index.styl +44 -0
- package/lib/static/components/controls/controls.less +0 -31
- package/lib/static/components/icons/arrows-move.js +24 -0
- package/lib/static/components/modals/screenshot-accepter/body.js +4 -12
- package/lib/static/components/modals/screenshot-accepter/header.js +3 -32
- package/lib/static/components/state/index.js +2 -9
- package/lib/static/components/state/{diff-circle.js → screenshot/diff-circle.js} +1 -1
- package/lib/static/components/state/screenshot/full.js +28 -0
- package/lib/static/components/state/{screenshot.js → screenshot/resized.js} +28 -30
- package/lib/static/components/state/screenshot/with-encode-uri.js +44 -0
- package/lib/static/components/state/screenshot/with-synced-scale.js +116 -0
- package/lib/static/components/state/state-error.js +3 -3
- package/lib/static/components/state/state-fail/index.js +142 -0
- package/lib/static/components/state/state-fail/index.styl +31 -0
- package/lib/static/components/state/state-fail/onion-skin-diff/index.js +43 -0
- package/lib/static/components/state/state-fail/onion-skin-diff/index.styl +19 -0
- package/lib/static/components/state/state-fail/prop-types.js +16 -0
- package/lib/static/components/state/state-fail/swipe-diff/index.js +138 -0
- package/lib/static/components/state/state-fail/swipe-diff/index.styl +82 -0
- package/lib/static/components/state/state-fail/switch-diff/index.js +36 -0
- package/lib/static/components/state/state-fail/switch-diff/index.styl +12 -0
- package/lib/static/components/state/state-success.js +2 -2
- package/lib/static/gui.html +13 -0
- package/lib/static/gui.min.css +678 -0
- package/lib/static/gui.min.js +106 -0
- package/lib/static/index.html +13 -0
- package/lib/static/modules/action-names.js +6 -2
- package/lib/static/modules/actions.js +27 -3
- package/lib/static/modules/default-state.js +2 -2
- package/lib/static/modules/middlewares/local-storage.js +1 -2
- package/lib/static/modules/middlewares/metrika.js +6 -2
- package/lib/static/modules/reducers/view.js +27 -12
- package/lib/static/report.min.css +678 -0
- package/lib/static/report.min.js +106 -0
- package/lib/static/styles.css +3 -11
- package/lib/test-adapter.js +11 -2
- package/package.json +4 -2
- package/webpack.common.js +7 -0
- package/lib/static/components/controls/view-select.js +0 -50
- package/lib/static/components/state/state-fail.js +0 -56
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>HTML report</title>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
|
7
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css"/>
|
|
8
|
+
<link id="dynamic-favicon" rel="icon" type="image/png" href="icons/favicon.png" />
|
|
9
|
+
<link href="report.min.css" rel="stylesheet"></head>
|
|
10
|
+
<body class="report">
|
|
11
|
+
<div id="app"></div>
|
|
12
|
+
<script type="text/javascript" src="data.js"></script><script type="text/javascript" src="sql-wasm.js"></script><script type="text/javascript" src="report.min.js"></script></body>
|
|
13
|
+
</html>
|
|
@@ -29,12 +29,16 @@ export default {
|
|
|
29
29
|
VIEW_SHOW_ALL: 'VIEW_SHOW_ALL',
|
|
30
30
|
VIEW_SHOW_FAILED: 'VIEW_SHOW_FAILED',
|
|
31
31
|
VIEW_TOGGLE_SKIPPED: 'VIEW_TOGGLE_SKIPPED',
|
|
32
|
-
VIEW_TOGGLE_ONLY_DIFF: 'VIEW_TOGGLE_ONLY_DIFF',
|
|
33
32
|
VIEW_UPDATE_BASE_HOST: 'VIEW_UPDATE_BASE_HOST',
|
|
34
33
|
VIEW_UPDATE_FILTER_BY_NAME: 'VIEW_UPDATE_FILTER_BY_NAME',
|
|
35
34
|
VIEW_SET_STRICT_MATCH_FILTER: 'VIEW_SET_STRICT_MATCH_FILTER',
|
|
36
35
|
VIEW_TOGGLE_GROUP_BY_ERROR: 'VIEW_TOGGLE_GROUP_BY_ERROR',
|
|
37
|
-
|
|
36
|
+
VIEW_THREE_UP_DIFF: 'VIEW_THREE_UP_DIFF',
|
|
37
|
+
VIEW_THREE_UP_SCALED_DIFF: 'VIEW_THREE_UP_SCALED_DIFF',
|
|
38
|
+
VIEW_ONLY_DIFF: 'VIEW_ONLY_DIFF',
|
|
39
|
+
VIEW_SWITCH_DIFF: 'VIEW_SWITCH_DIFF',
|
|
40
|
+
VIEW_SWIPE_DIFF: 'VIEW_SWIPE_DIFF',
|
|
41
|
+
VIEW_ONION_SKIN_DIFF: 'VIEW_ONION_SKIN_DIFF',
|
|
38
42
|
PROCESS_BEGIN: 'PROCESS_BEGIN',
|
|
39
43
|
PROCESS_END: 'PROCESS_END',
|
|
40
44
|
RUN_CUSTOM_GUI_ACTION: 'RUN_CUSTOM_GUI_ACTION',
|
|
@@ -5,6 +5,8 @@ import StaticTestsTreeBuilder from '../../tests-tree-builder/static';
|
|
|
5
5
|
import actionNames from './action-names';
|
|
6
6
|
import {types as modalTypes} from '../components/modals';
|
|
7
7
|
import {QUEUED} from '../../constants/test-statuses';
|
|
8
|
+
import viewModes from '../../constants/view-modes';
|
|
9
|
+
import diffModes from '../../constants/diff-modes';
|
|
8
10
|
import {getHttpErrorMessage} from './utils';
|
|
9
11
|
import {fetchDataFromDatabases, mergeDatabases, connectToDatabase, getMainDatabaseUrl, getSuitesTableRows} from '../../db-utils/client';
|
|
10
12
|
import {setFilteredBrowsers} from './query-params';
|
|
@@ -175,8 +177,6 @@ export const expandErrors = () => ({type: actionNames.VIEW_EXPAND_ERRORS});
|
|
|
175
177
|
export const expandRetries = () => ({type: actionNames.VIEW_EXPAND_RETRIES});
|
|
176
178
|
export const collapseAll = () => ({type: actionNames.VIEW_COLLAPSE_ALL});
|
|
177
179
|
export const toggleSkipped = () => ({type: actionNames.VIEW_TOGGLE_SKIPPED});
|
|
178
|
-
export const toggleOnlyDiff = () => ({type: actionNames.VIEW_TOGGLE_ONLY_DIFF});
|
|
179
|
-
export const toggleScaleImages = () => ({type: actionNames.VIEW_TOGGLE_SCALE_IMAGES});
|
|
180
180
|
export const toggleGroupByError = () => ({type: actionNames.VIEW_TOGGLE_GROUP_BY_ERROR});
|
|
181
181
|
export const processBegin = () => ({type: actionNames.PROCESS_BEGIN});
|
|
182
182
|
export const processEnd = () => ({type: actionNames.PROCESS_END});
|
|
@@ -215,13 +215,37 @@ export const setStrictMatchFilter = (strictMatchFilter) => {
|
|
|
215
215
|
|
|
216
216
|
export function changeViewMode(mode) {
|
|
217
217
|
switch (mode) {
|
|
218
|
-
case
|
|
218
|
+
case viewModes.FAILED:
|
|
219
219
|
return {type: actionNames.VIEW_SHOW_FAILED};
|
|
220
|
+
case viewModes.ALL:
|
|
220
221
|
default:
|
|
221
222
|
return {type: actionNames.VIEW_SHOW_ALL};
|
|
222
223
|
}
|
|
223
224
|
}
|
|
224
225
|
|
|
226
|
+
export function changeDiffMode(mode) {
|
|
227
|
+
switch (mode) {
|
|
228
|
+
case diffModes.ONLY_DIFF.id:
|
|
229
|
+
return {type: actionNames.VIEW_ONLY_DIFF};
|
|
230
|
+
|
|
231
|
+
case diffModes.SWITCH.id:
|
|
232
|
+
return {type: actionNames.VIEW_SWITCH_DIFF};
|
|
233
|
+
|
|
234
|
+
case diffModes.SWIPE.id:
|
|
235
|
+
return {type: actionNames.VIEW_SWIPE_DIFF};
|
|
236
|
+
|
|
237
|
+
case diffModes.ONION_SKIN.id:
|
|
238
|
+
return {type: actionNames.VIEW_ONION_SKIN_DIFF};
|
|
239
|
+
|
|
240
|
+
case diffModes.THREE_UP_SCALED.id:
|
|
241
|
+
return {type: actionNames.VIEW_THREE_UP_SCALED_DIFF};
|
|
242
|
+
|
|
243
|
+
case diffModes.THREE_UP.id:
|
|
244
|
+
default:
|
|
245
|
+
return {type: actionNames.VIEW_THREE_UP_DIFF};
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
225
249
|
export const findSameDiffs = (selectedImageId, openedImageIds, browserName) => {
|
|
226
250
|
return async (dispatch) => {
|
|
227
251
|
dispatch(toggleLoading({active: true, content: 'Find same diffs...'}));
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const defaults = require('../../constants/defaults');
|
|
4
4
|
const viewModes = require('../../constants/view-modes');
|
|
5
|
+
const diffModes = require('../../constants/diff-modes');
|
|
5
6
|
const {EXPAND_ERRORS} = require('../../constants/expand-modes');
|
|
6
7
|
|
|
7
8
|
export default Object.assign(defaults, {
|
|
@@ -56,10 +57,9 @@ export default Object.assign(defaults, {
|
|
|
56
57
|
},
|
|
57
58
|
view: {
|
|
58
59
|
viewMode: viewModes.ALL,
|
|
60
|
+
diffMode: diffModes.THREE_UP.id,
|
|
59
61
|
expand: EXPAND_ERRORS,
|
|
60
62
|
showSkipped: false,
|
|
61
|
-
showOnlyDiff: false,
|
|
62
|
-
scaleImages: false,
|
|
63
63
|
baseHost: '',
|
|
64
64
|
testNameFilter: '',
|
|
65
65
|
strictMatchFilter: false,
|
|
@@ -12,9 +12,8 @@ export default store => next => action => {
|
|
|
12
12
|
localStorageWrapper.setItem('view', {
|
|
13
13
|
expand: view.expand,
|
|
14
14
|
viewMode: view.viewMode,
|
|
15
|
+
diffMode: view.diffMode,
|
|
15
16
|
showSkipped: view.showSkipped,
|
|
16
|
-
showOnlyDiff: view.showOnlyDiff,
|
|
17
|
-
scaleImages: view.scaleImages,
|
|
18
17
|
groupByError: view.groupByError,
|
|
19
18
|
strictMatchFilter: view.strictMatchFilter
|
|
20
19
|
});
|
|
@@ -68,10 +68,14 @@ export default metrikaClass => store => next => action => {
|
|
|
68
68
|
case actionNames.VIEW_EXPAND_ERRORS:
|
|
69
69
|
case actionNames.VIEW_EXPAND_RETRIES:
|
|
70
70
|
case actionNames.VIEW_TOGGLE_SKIPPED:
|
|
71
|
-
case actionNames.VIEW_TOGGLE_ONLY_DIFF:
|
|
72
|
-
case actionNames.VIEW_TOGGLE_SCALE_IMAGES:
|
|
73
71
|
case actionNames.VIEW_TOGGLE_GROUP_BY_ERROR:
|
|
74
72
|
case actionNames.VIEW_UPDATE_BASE_HOST:
|
|
73
|
+
case actionNames.VIEW_THREE_UP_DIFF:
|
|
74
|
+
case actionNames.VIEW_THREE_UP_SCALED_DIFF:
|
|
75
|
+
case actionNames.VIEW_ONLY_DIFF:
|
|
76
|
+
case actionNames.VIEW_SWITCH_DIFF:
|
|
77
|
+
case actionNames.VIEW_SWIPE_DIFF:
|
|
78
|
+
case actionNames.VIEW_ONION_SKIN_DIFF:
|
|
75
79
|
case actionNames.BROWSERS_SELECTED:
|
|
76
80
|
case actionNames.VIEW_UPDATE_FILTER_BY_NAME:
|
|
77
81
|
case actionNames.VIEW_SET_STRICT_MATCH_FILTER:
|
|
@@ -5,13 +5,14 @@ import {getViewQuery} from '../custom-queries';
|
|
|
5
5
|
import * as localStorageWrapper from '../local-storage-wrapper';
|
|
6
6
|
import actionNames from '../action-names';
|
|
7
7
|
import viewModes from '../../../constants/view-modes';
|
|
8
|
+
import diffModes from '../../../constants/diff-modes';
|
|
8
9
|
import {EXPAND_ALL, COLLAPSE_ALL, EXPAND_ERRORS, EXPAND_RETRIES} from '../../../constants/expand-modes';
|
|
9
10
|
|
|
10
11
|
export default produce((state, action) => {
|
|
11
12
|
switch (action.type) {
|
|
12
13
|
case actionNames.INIT_GUI_REPORT:
|
|
13
14
|
case actionNames.INIT_STATIC_REPORT: {
|
|
14
|
-
const {
|
|
15
|
+
const {baseHost, defaultView: viewMode, diffMode} = state.config;
|
|
15
16
|
const viewQuery = getViewQuery(window.location.search);
|
|
16
17
|
const lsView = localStorageWrapper.getItem('view', {});
|
|
17
18
|
|
|
@@ -19,7 +20,7 @@ export default produce((state, action) => {
|
|
|
19
20
|
viewQuery.filteredBrowsers = state.browsers;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
state.view = {...state.view,
|
|
23
|
+
state.view = {...state.view, viewMode, diffMode, baseHost, ...lsView, ...viewQuery};
|
|
23
24
|
|
|
24
25
|
break;
|
|
25
26
|
}
|
|
@@ -67,16 +68,6 @@ export default produce((state, action) => {
|
|
|
67
68
|
break;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
case actionNames.VIEW_TOGGLE_ONLY_DIFF: {
|
|
71
|
-
state.view.showOnlyDiff = !state.view.showOnlyDiff;
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
case actionNames.VIEW_TOGGLE_SCALE_IMAGES: {
|
|
76
|
-
state.view.scaleImages = !state.view.scaleImages;
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
71
|
case actionNames.VIEW_UPDATE_BASE_HOST: {
|
|
81
72
|
const baseHost = action.host;
|
|
82
73
|
const parsedHost = parseHost(baseHost);
|
|
@@ -106,6 +97,30 @@ export default produce((state, action) => {
|
|
|
106
97
|
state.view.filteredBrowsers = action.payload.browsers;
|
|
107
98
|
break;
|
|
108
99
|
}
|
|
100
|
+
|
|
101
|
+
case actionNames.VIEW_THREE_UP_DIFF:
|
|
102
|
+
state.view.diffMode = diffModes.THREE_UP.id;
|
|
103
|
+
break;
|
|
104
|
+
|
|
105
|
+
case actionNames.VIEW_THREE_UP_SCALED_DIFF:
|
|
106
|
+
state.view.diffMode = diffModes.THREE_UP_SCALED.id;
|
|
107
|
+
break;
|
|
108
|
+
|
|
109
|
+
case actionNames.VIEW_ONLY_DIFF:
|
|
110
|
+
state.view.diffMode = diffModes.ONLY_DIFF.id;
|
|
111
|
+
break;
|
|
112
|
+
|
|
113
|
+
case actionNames.VIEW_SWITCH_DIFF:
|
|
114
|
+
state.view.diffMode = diffModes.SWITCH.id;
|
|
115
|
+
break;
|
|
116
|
+
|
|
117
|
+
case actionNames.VIEW_SWIPE_DIFF:
|
|
118
|
+
state.view.diffMode = diffModes.SWIPE.id;
|
|
119
|
+
break;
|
|
120
|
+
|
|
121
|
+
case actionNames.VIEW_ONION_SKIN_DIFF:
|
|
122
|
+
state.view.diffMode = diffModes.ONION_SKIN.id;
|
|
123
|
+
break;
|
|
109
124
|
}
|
|
110
125
|
});
|
|
111
126
|
|