html-reporter 8.4.2 → 8.4.3

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 CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ <a name="8.4.3"></a>
6
+ ## [8.4.3](https://github.com/gemini-testing/html-reporter/compare/v8.4.2...v8.4.3) (2022-04-26)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **state:** hide control buttons ([0b7c79f](https://github.com/gemini-testing/html-reporter/commit/0b7c79f))
12
+ * **state-error:** hide error info for "AssertViewError" ([0711226](https://github.com/gemini-testing/html-reporter/commit/0711226))
13
+ * **static:** fix error when accept the screenshot ([06cfc61](https://github.com/gemini-testing/html-reporter/commit/06cfc61))
14
+
15
+
16
+
5
17
  <a name="8.4.2"></a>
6
18
  ## [8.4.2](https://github.com/gemini-testing/html-reporter/compare/v8.4.1...v8.4.2) (2022-03-31)
7
19
 
package/hermione.js CHANGED
@@ -39,7 +39,7 @@ async function prepare(hermione, reportBuilder, pluginConfig) {
39
39
  }
40
40
 
41
41
  if (formattedResult.screenshot) {
42
- actions.push(formattedResult.saveBase64Screenshot(reportPath));
42
+ actions.push(formattedResult.saveErrorScreenshot(reportPath));
43
43
  }
44
44
 
45
45
  await Promise.all(actions);
@@ -17,7 +17,7 @@ module.exports = (hermione, reportBuilder, client, reportPath) => {
17
17
  const actions = [formattedResult.saveTestImages(reportPath, workers)];
18
18
 
19
19
  if (formattedResult.screenshot) {
20
- actions.push(formattedResult.saveBase64Screenshot(reportPath));
20
+ actions.push(formattedResult.saveErrorScreenshot(reportPath));
21
21
  }
22
22
 
23
23
  if (formattedResult.errorDetails) {
@@ -70,6 +70,10 @@ class State extends Component {
70
70
  const isAcceptDisabled = !isAcceptable(node);
71
71
  const isFindSameDiffDisabled = !isFailStatus(node.status);
72
72
 
73
+ if (isAcceptDisabled && isFindSameDiffDisabled && isScreenshotAccepterDisabled) {
74
+ return null;
75
+ }
76
+
73
77
  return (
74
78
  <div className="state-controls">
75
79
  <ControlButton
@@ -8,7 +8,7 @@ import {isEmpty, map, isFunction} from 'lodash';
8
8
  import ReactHtmlParser from 'react-html-parser';
9
9
  import * as actions from '../../modules/actions';
10
10
  import Screenshot from './screenshot';
11
- import {isNoRefImageError} from '../../modules/utils';
11
+ import {isNoRefImageError, isAssertViewError} from '../../modules/utils';
12
12
  import ErrorDetails from './error-details';
13
13
  import Details from '../details';
14
14
  import {ERROR_TITLE_TEXT_LENGTH} from '../../../constants/errors';
@@ -94,6 +94,10 @@ class StateError extends Component {
94
94
  });
95
95
  }
96
96
 
97
+ _shouldDrawErrorInfo(error) {
98
+ return !isAssertViewError(error);
99
+ }
100
+
97
101
  render() {
98
102
  const {error, errorDetails} = this.props;
99
103
  const errorPattern = this._getErrorPattern();
@@ -104,7 +108,7 @@ class StateError extends Component {
104
108
 
105
109
  return (
106
110
  <div className="image-box__image image-box__image_single">
107
- <div className="error">{this._errorToElements(extendedError)}</div>
111
+ {this._shouldDrawErrorInfo(extendedError) && <div className="error">{this._errorToElements(extendedError)}</div>}
108
112
  {errorDetails && <ErrorDetails errorDetails={errorDetails} />}
109
113
  {this._drawImage()}
110
114
  </div>
@@ -10,7 +10,7 @@ const {NO_REF_IMAGE_ERROR, ASSERT_VIEW_ERROR} = getCommonErrors();
10
10
  function hasFailedImages(result) {
11
11
  const {imagesInfo = []} = result;
12
12
 
13
- return imagesInfo.some(({status}) => isErroredStatus(status) || isFailStatus(status));
13
+ return imagesInfo.some(({error, status}) => !isAssertViewError(error) && (isErroredStatus(status) || isFailStatus(status)));
14
14
  }
15
15
 
16
16
  function isNoRefImageError(error) {
@@ -124,7 +124,7 @@ module.exports = class TestAdapter {
124
124
  return {};
125
125
  }
126
126
 
127
- async saveBase64Screenshot(reportPath) {
127
+ async saveErrorScreenshot(reportPath) {
128
128
  if (!this.screenshot.base64) {
129
129
  logger.warn('Cannot save screenshot on reject');
130
130
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-reporter",
3
- "version": "8.4.2",
3
+ "version": "8.4.3",
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",
@@ -1,13 +0,0 @@
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>