html-reporter 8.4.4 → 9.0.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 +15 -0
- package/README.md +9 -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/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.min.css +192 -27
- package/lib/static/gui.min.js +16 -16
- 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 +192 -27
- package/lib/static/report.min.js +16 -16
- package/lib/static/styles.css +3 -11
- package/package.json +3 -1
- 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
package/lib/static/styles.css
CHANGED
|
@@ -257,25 +257,21 @@ main.container {
|
|
|
257
257
|
|
|
258
258
|
.image-box__container,
|
|
259
259
|
.image-box__screenshot-container {
|
|
260
|
+
display: flex;
|
|
261
|
+
flex-direction: column;
|
|
260
262
|
margin-top: 10px;
|
|
261
263
|
}
|
|
262
264
|
|
|
263
|
-
.image-box__container
|
|
265
|
+
.image-box__container .image-box__image:not(:last-child) {
|
|
264
266
|
margin-bottom: 5px;
|
|
265
267
|
}
|
|
266
268
|
|
|
267
|
-
.image-box__container_scale {
|
|
268
|
-
display: flex;
|
|
269
|
-
flex-flow: row wrap;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
269
|
.report_show-only-errors .section_status_success,
|
|
273
270
|
.report_show-only-errors .section_status_skipped {
|
|
274
271
|
display: none;
|
|
275
272
|
}
|
|
276
273
|
|
|
277
274
|
.image-box__image {
|
|
278
|
-
padding-right: 10px;
|
|
279
275
|
display: inline-block;
|
|
280
276
|
vertical-align: top;
|
|
281
277
|
flex-basis: 33.333%;
|
|
@@ -284,10 +280,6 @@ main.container {
|
|
|
284
280
|
max-width: 100%;
|
|
285
281
|
}
|
|
286
282
|
|
|
287
|
-
.image-box__image:last-child {
|
|
288
|
-
margin-right: -10px;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
283
|
.image-box__image.image-box__image_single {
|
|
292
284
|
display: block;
|
|
293
285
|
padding-right: 0px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-reporter",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.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",
|
|
@@ -149,6 +149,8 @@
|
|
|
149
149
|
"standard-version": "^4.0.0",
|
|
150
150
|
"style-loader": "^0.19.0",
|
|
151
151
|
"styled-components": "^3.4.10",
|
|
152
|
+
"stylus": "^0.57.0",
|
|
153
|
+
"stylus-loader": "^3.0.2",
|
|
152
154
|
"url-loader": "^1.1.2",
|
|
153
155
|
"webpack": "^3.6.0",
|
|
154
156
|
"webpack-dev-server": "^2.11.5",
|
package/webpack.common.js
CHANGED
|
@@ -38,6 +38,13 @@ module.exports = {
|
|
|
38
38
|
use: ['css-loader', 'less-loader']
|
|
39
39
|
})
|
|
40
40
|
},
|
|
41
|
+
{
|
|
42
|
+
test: /\.styl$/,
|
|
43
|
+
loader: ExtractTextPlugin.extract({
|
|
44
|
+
fallback: 'style-loader',
|
|
45
|
+
use: ['css-loader', 'stylus-loader']
|
|
46
|
+
})
|
|
47
|
+
},
|
|
41
48
|
{
|
|
42
49
|
test: /\.js$/,
|
|
43
50
|
use: 'babel-loader',
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import React, {Component} from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import {bindActionCreators} from 'redux';
|
|
6
|
-
import {connect} from 'react-redux';
|
|
7
|
-
import {Dropdown} from 'semantic-ui-react';
|
|
8
|
-
import * as actions from '../../modules/actions';
|
|
9
|
-
|
|
10
|
-
class ViewSelect extends Component {
|
|
11
|
-
static propTypes = {
|
|
12
|
-
viewMode: PropTypes.string.isRequired,
|
|
13
|
-
actions: PropTypes.object.isRequired,
|
|
14
|
-
options: PropTypes.array.isRequired
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
constructor(props) {
|
|
18
|
-
super(props);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
_onChange = (_, dom) => {
|
|
22
|
-
this.props.actions.changeViewMode(dom.value);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
render() {
|
|
26
|
-
const {viewMode, options} = this.props;
|
|
27
|
-
const formatedOpts = options.map(({value, text}) => ({
|
|
28
|
-
value,
|
|
29
|
-
text,
|
|
30
|
-
key: value
|
|
31
|
-
}));
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<div className="viewmode">
|
|
35
|
-
<Dropdown
|
|
36
|
-
fluid
|
|
37
|
-
selection
|
|
38
|
-
options={formatedOpts}
|
|
39
|
-
value={viewMode}
|
|
40
|
-
onChange={this._onChange}
|
|
41
|
-
/>
|
|
42
|
-
</div>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export default connect(
|
|
48
|
-
({view}) => ({viewMode: view.viewMode}),
|
|
49
|
-
(dispatch) => ({actions: bindActionCreators(actions, dispatch)})
|
|
50
|
-
)(ViewSelect);
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import React, {Component, Fragment} from 'react';
|
|
4
|
-
import {connect} from 'react-redux';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import Screenshot from './screenshot';
|
|
7
|
-
|
|
8
|
-
class StateFail extends Component {
|
|
9
|
-
static propTypes = {
|
|
10
|
-
image: PropTypes.shape({
|
|
11
|
-
expectedImg: PropTypes.object.isRequired,
|
|
12
|
-
actualImg: PropTypes.object.isRequired,
|
|
13
|
-
diffImg: PropTypes.object.isRequired,
|
|
14
|
-
diffClusters: PropTypes.array
|
|
15
|
-
}).isRequired,
|
|
16
|
-
// from store
|
|
17
|
-
showOnlyDiff: PropTypes.bool.isRequired
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
render() {
|
|
21
|
-
const {image: {expectedImg, actualImg, diffImg, diffClusters}} = this.props;
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<Fragment>
|
|
25
|
-
{this._drawExpectedAndActual(expectedImg, actualImg)}
|
|
26
|
-
{this._drawImageBox('Diff', diffImg, diffClusters)}
|
|
27
|
-
</Fragment>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
_drawExpectedAndActual(expectedImg, actualImg) {
|
|
32
|
-
if (this.props.showOnlyDiff) {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<Fragment>
|
|
38
|
-
{this._drawImageBox('Expected', expectedImg)}
|
|
39
|
-
{this._drawImageBox('Actual', actualImg)}
|
|
40
|
-
</Fragment>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
_drawImageBox(label, diffImg, diffClusters) {
|
|
45
|
-
return (
|
|
46
|
-
<div className="image-box__image">
|
|
47
|
-
<div className="image-box__title">{label}</div>
|
|
48
|
-
<Screenshot image={diffImg} diffClusters={diffClusters}/>
|
|
49
|
-
</div>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export default connect(
|
|
55
|
-
({view: {showOnlyDiff}}) => ({showOnlyDiff})
|
|
56
|
-
)(StateFail);
|