html-reporter 9.7.5 → 9.8.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 +38 -0
- package/README.md +4 -681
- package/docs/en/html-reporter-api.md +198 -0
- package/docs/en/html-reporter-commands.md +96 -0
- package/docs/en/html-reporter-custom-gui.md +99 -0
- package/docs/en/html-reporter-events.md +125 -0
- package/docs/en/html-reporter-plugins.md +265 -0
- package/docs/en/html-reporter-setup.md +378 -0
- package/docs/en/html-reporter.md +8 -0
- package/docs/ru/html-reporter-api.md +198 -0
- package/docs/ru/html-reporter-commands.md +96 -0
- package/docs/ru/html-reporter-custom-gui.md +99 -0
- package/docs/ru/html-reporter-events.md +125 -0
- package/docs/ru/html-reporter-plugins.md +265 -0
- package/docs/ru/html-reporter-setup.md +378 -0
- package/docs/ru/html-reporter.md +8 -0
- package/lib/common-utils.js +6 -0
- package/lib/constants/database.js +32 -13
- package/lib/gui/tool-runner/index.js +11 -4
- package/lib/history-utils.js +32 -14
- package/lib/report-builder/static.js +9 -4
- package/lib/sqlite-adapter.js +40 -0
- package/lib/static/components/header/summary/dbBtn.js +36 -0
- package/lib/static/components/header/summary/dbSummary.js +3 -22
- package/lib/static/components/icons/view-in-browser/index.js +2 -8
- package/lib/static/components/modals/screenshot-accepter/header.js +8 -1
- package/lib/static/components/modals/screenshot-accepter/index.js +56 -29
- package/lib/static/components/modals/screenshot-accepter/style.css +11 -0
- package/lib/static/components/progress-bar/index.js +13 -0
- package/lib/static/components/progress-bar/index.styl +24 -0
- package/lib/static/components/section/body/history/index.js +29 -0
- package/lib/static/components/section/body/history/index.styl +4 -0
- package/lib/static/components/section/body/meta-info/content.js +24 -9
- package/lib/static/components/section/body/result.js +2 -0
- package/lib/static/gui.html +13 -1
- package/lib/static/gui.min.css +691 -1
- package/lib/static/gui.min.js +47 -61
- package/lib/static/index.html +13 -1
- package/lib/static/modules/action-names.js +2 -0
- package/lib/static/modules/actions.js +13 -0
- package/lib/static/modules/middlewares/metrika.js +4 -2
- package/lib/static/modules/reducers/grouped-tests/index.js +2 -1
- package/lib/static/modules/reducers/tree/index.js +2 -1
- package/lib/static/modules/reducers/tree/nodes/results.js +1 -5
- package/lib/static/modules/reducers/view.js +34 -61
- package/lib/static/report.min.css +691 -1
- package/lib/static/report.min.js +47 -61
- package/lib/static/styles.css +16 -0
- package/lib/test-adapter.js +62 -19
- package/lib/tests-tree-builder/static.js +1 -0
- package/package.json +1 -1
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import React, {Component} from 'react';
|
|
2
|
+
import React, {Component, Fragment} from 'react';
|
|
3
3
|
import {connect} from 'react-redux';
|
|
4
|
+
import ClipboardButton from 'react-clipboard.js';
|
|
4
5
|
import PropTypes from 'prop-types';
|
|
5
6
|
import {map, mapValues, isObject, omitBy, isEmpty} from 'lodash';
|
|
6
|
-
import {isUrl} from '../../../../../common-utils';
|
|
7
|
+
import {isUrl, buildUrl} from '../../../../../common-utils';
|
|
7
8
|
|
|
8
9
|
const mkLinkToUrl = (url, text = url) => {
|
|
9
|
-
return <
|
|
10
|
+
return <Fragment>
|
|
11
|
+
<a data-suite-view-link={url} className="custom-icon_view-local" target="_blank" href={url}>
|
|
12
|
+
{text}
|
|
13
|
+
</a>
|
|
14
|
+
<ClipboardButton
|
|
15
|
+
className="button custom-icon custom-icon_copy-to-clipboard"
|
|
16
|
+
button-title="copy to clipboard"
|
|
17
|
+
data-clipboard-text={url}>
|
|
18
|
+
</ClipboardButton>
|
|
19
|
+
</Fragment>;
|
|
10
20
|
};
|
|
11
21
|
|
|
12
22
|
const serializeMetaValues = (metaInfo) => mapValues(metaInfo, (v) => isObject(v) ? JSON.stringify(v) : v);
|
|
@@ -39,7 +49,10 @@ const metaToElements = (metaInfo, metaInfoBaseUrls) => {
|
|
|
39
49
|
value = value.toString();
|
|
40
50
|
}
|
|
41
51
|
|
|
42
|
-
return <div key
|
|
52
|
+
return <div key={key} className="meta-info__item">
|
|
53
|
+
<span className="meta-info__item-key">{key}: </span>
|
|
54
|
+
<div className="meta-info__item-value">{value}</div>
|
|
55
|
+
</div>;
|
|
43
56
|
});
|
|
44
57
|
};
|
|
45
58
|
|
|
@@ -56,7 +69,8 @@ class MetaInfoContent extends Component {
|
|
|
56
69
|
apiValues: PropTypes.shape({
|
|
57
70
|
extraItems: PropTypes.object.isRequired,
|
|
58
71
|
metaInfoExtenders: PropTypes.object.isRequired
|
|
59
|
-
}).isRequired
|
|
72
|
+
}).isRequired,
|
|
73
|
+
parsedHost: PropTypes.object
|
|
60
74
|
};
|
|
61
75
|
|
|
62
76
|
getExtraMetaInfo = () => {
|
|
@@ -70,14 +84,14 @@ class MetaInfoContent extends Component {
|
|
|
70
84
|
}
|
|
71
85
|
|
|
72
86
|
render() {
|
|
73
|
-
const {result, metaInfoBaseUrls} = this.props;
|
|
87
|
+
const {result, metaInfoBaseUrls, parsedHost} = this.props;
|
|
74
88
|
|
|
75
89
|
const serializedMetaValues = serializeMetaValues(result.metaInfo);
|
|
76
90
|
const extraMetaInfo = this.getExtraMetaInfo();
|
|
77
91
|
const formattedMetaInfo = {
|
|
78
92
|
...serializedMetaValues,
|
|
79
93
|
...extraMetaInfo,
|
|
80
|
-
url: mkLinkToUrl(result.suiteUrl, result.metaInfo.url)
|
|
94
|
+
url: mkLinkToUrl(buildUrl(result.suiteUrl, parsedHost), result.metaInfo.url)
|
|
81
95
|
};
|
|
82
96
|
|
|
83
97
|
return metaToElements(formattedMetaInfo, metaInfoBaseUrls);
|
|
@@ -85,7 +99,7 @@ class MetaInfoContent extends Component {
|
|
|
85
99
|
}
|
|
86
100
|
|
|
87
101
|
export default connect(
|
|
88
|
-
({tree, config: {metaInfoBaseUrls}, apiValues}, {resultId}) => {
|
|
102
|
+
({tree, config: {metaInfoBaseUrls}, apiValues, view}, {resultId}) => {
|
|
89
103
|
const result = tree.results.byId[resultId];
|
|
90
104
|
const browser = tree.browsers.byId[result.parentId];
|
|
91
105
|
|
|
@@ -93,7 +107,8 @@ export default connect(
|
|
|
93
107
|
result,
|
|
94
108
|
testName: browser.parentId,
|
|
95
109
|
metaInfoBaseUrls,
|
|
96
|
-
apiValues
|
|
110
|
+
apiValues,
|
|
111
|
+
parsedHost: view.parsedHost
|
|
97
112
|
};
|
|
98
113
|
}
|
|
99
114
|
)(MetaInfoContent);
|
|
@@ -2,6 +2,7 @@ import React, {Component, Fragment} from 'react';
|
|
|
2
2
|
import {connect} from 'react-redux';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import MetaInfo from './meta-info';
|
|
5
|
+
import History from './history';
|
|
5
6
|
import Description from './description';
|
|
6
7
|
import Tabs from './tabs';
|
|
7
8
|
import ExtensionPoint from '../../extension-point';
|
|
@@ -26,6 +27,7 @@ class Result extends Component {
|
|
|
26
27
|
<Fragment>
|
|
27
28
|
<ExtensionPoint name={RESULT_META} result={result} testName={testName}>
|
|
28
29
|
<MetaInfo resultId={resultId} />
|
|
30
|
+
<History resultId={resultId} />
|
|
29
31
|
</ExtensionPoint>
|
|
30
32
|
{result.description && <Description content={result.description} />}
|
|
31
33
|
<Tabs result={result} />
|
package/lib/static/gui.html
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>Gui 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="gui.min.css" rel="stylesheet"></head>
|
|
10
|
+
<body class="report">
|
|
11
|
+
<div id="app"></div>
|
|
12
|
+
<script type="text/javascript" src="sql-wasm.js"></script><script type="text/javascript" src="gui.min.js"></script></body>
|
|
13
|
+
</html>
|