diff --git a/CHANGELOG.md b/CHANGELOG.md
index d6256e368..7311200f4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,16 @@
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.
+
+## [2.20.5](https://github.com/gemini-testing/html-reporter/compare/v2.20.4...v2.20.5) (2018-07-23)
+
+
+### Bug Fixes
+
+* display all info about test result ([80e4beb](https://github.com/gemini-testing/html-reporter/commit/80e4beb))
+
+
+
## [2.20.4](https://github.com/gemini-testing/html-reporter/compare/v2.20.3...v2.20.4) (2018-07-18)
diff --git a/lib/report-builder-factory/report-builder.js b/lib/report-builder-factory/report-builder.js
index 11151003f..794860478 100644
--- a/lib/report-builder-factory/report-builder.js
+++ b/lib/report-builder-factory/report-builder.js
@@ -104,13 +104,15 @@ module.exports = class ReportBuilder {
}
_createTestResult(result, props) {
- const {browserId, suite, sessionId, description, imagesInfo} = result;
+ const {browserId, suite, sessionId, description, imagesInfo, screenshot, multipleTabs} = result;
const {baseHost} = this._pluginConfig;
const suiteUrl = suite.getUrl({browserId, baseHost});
-
const metaInfo = _.merge(result.meta, {url: suite.fullUrl, file: suite.file, sessionId});
- return Object.assign({suiteUrl, name: browserId, metaInfo, description, imagesInfo}, props);
+ return Object.assign({
+ suiteUrl, name: browserId, metaInfo, description, imagesInfo,
+ screenshot: Boolean(screenshot), multipleTabs
+ }, props);
}
_addTestResult(formattedResult, props) {
@@ -152,7 +154,11 @@ module.exports = class ReportBuilder {
const {imagesInfo} = stateInBrowser.result;
stateInBrowser.result = extendTestWithImagePaths(testResult, formattedResult, imagesInfo);
- stateInBrowser.result.status = hasFails(stateInBrowser) ? FAIL : SUCCESS;
+
+ if (!hasFails(stateInBrowser)) {
+ stateInBrowser.result.status = SUCCESS;
+ }
+
setStatusForBranch(this._tree, node.suitePath, testResult.status);
return formattedResult;
diff --git a/lib/static/components/section/body/index.js b/lib/static/components/section/body/index.js
index e6f34732b..04d6f07a4 100644
--- a/lib/static/components/section/body/index.js
+++ b/lib/static/components/section/body/index.js
@@ -12,7 +12,7 @@ import State from '../../state';
import MetaInfo from './meta-info';
import Description from './description';
import * as actions from '../../../modules/actions';
-import {isSuccessStatus} from '../../../../common-utils';
+import {isSuccessStatus, isErroredStatus} from '../../../../common-utils';
class Body extends Component {
static propTypes = {
@@ -84,13 +84,19 @@ class Body extends Component {
return isSuccessStatus(activeResult.status) ? null : this._drawTab(activeResult);
}
- return activeResult.imagesInfo.map((imageInfo, idx) => {
+ const tabs = activeResult.imagesInfo.map((imageInfo, idx) => {
const {stateName} = imageInfo;
const reason = imageInfo.reason || activeResult.reason;
const state = Object.assign({image: true, reason}, imageInfo);
return this._drawTab(state, stateName || idx);
});
+
+ const {multipleTabs, status, screenshot} = activeResult;
+
+ return multipleTabs && isErroredStatus(status) && !screenshot
+ ? tabs.concat(this._drawTab(activeResult))
+ : tabs;
}
_drawTab(state, key = '') {
diff --git a/lib/test-adapter/gemini-test-adapter.js b/lib/test-adapter/gemini-test-adapter.js
index 5962f3f5e..99834620f 100644
--- a/lib/test-adapter/gemini-test-adapter.js
+++ b/lib/test-adapter/gemini-test-adapter.js
@@ -76,4 +76,8 @@ module.exports = class GeminiTestResultAdapter extends TestAdapter {
return {name, suitePath, browserId};
}
+
+ get multipleTabs() {
+ return false;
+ }
};
diff --git a/lib/test-adapter/hermione-test-adapter.js b/lib/test-adapter/hermione-test-adapter.js
index eb552e245..753a045dc 100644
--- a/lib/test-adapter/hermione-test-adapter.js
+++ b/lib/test-adapter/hermione-test-adapter.js
@@ -132,4 +132,8 @@ module.exports = class HermioneTestResultAdapter extends TestAdapter {
return {name, suitePath, browserId};
}
+
+ get multipleTabs() {
+ return true;
+ }
};
diff --git a/package-lock.json b/package-lock.json
index f4910dac1..9c7bbeaa9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "html-reporter",
- "version": "2.20.4",
+ "version": "2.20.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 3b9f8e48c..f8b5b9a0e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "html-reporter",
- "version": "2.20.4",
+ "version": "2.20.5",
"description": "Plugin for gemini and hermione which is intended to aggregate the results of tests running into html report",
"scripts": {
"lint": "eslint .",
diff --git a/test/lib/report-builder-factory/report-builder.js b/test/lib/report-builder-factory/report-builder.js
index a8c5a23b8..15e1169c5 100644
--- a/test/lib/report-builder-factory/report-builder.js
+++ b/test/lib/report-builder-factory/report-builder.js
@@ -263,10 +263,10 @@ describe('ReportBuilder', () => {
describe('should not rewrite suite status to "success" if image comparison is successful, but test', () => {
[
- {status: 'failed', methodName: 'addFail'},
- {status: 'errored', methodName: 'addError'}
+ {status: FAIL, methodName: 'addFail'},
+ {status: ERROR, methodName: 'addError'}
].forEach(({status, methodName}) => {
- it(`${status}`, () => {
+ it(`${status}ed`, () => {
const reportBuilder = mkReportBuilder_();
const test = stubTest_({
@@ -278,7 +278,7 @@ describe('ReportBuilder', () => {
const suiteResult = getSuiteResult_(reportBuilder);
- assert.equal(suiteResult.status, FAIL);
+ assert.equal(suiteResult.status, status);
});
});
});
diff --git a/test/lib/static/components/section/body.js b/test/lib/static/components/section/body.js
index a731df5bf..1462a1269 100644
--- a/test/lib/static/components/section/body.js
+++ b/test/lib/static/components/section/body.js
@@ -1,7 +1,7 @@
import React from 'react';
import proxyquire from 'proxyquire';
import {mkConnectedComponent, mkTestResult_} from '../utils';
-import {ERROR} from 'lib/constants/test-statuses';
+import {SUCCESS, FAIL, ERROR} from 'lib/constants/test-statuses';
describe('