diff --git a/lib/static/components/icons/view-in-browser/index.styl b/lib/static/components/icons/view-in-browser/index.styl
index 45d33b270..b044f86ef 100644
--- a/lib/static/components/icons/view-in-browser/index.styl
+++ b/lib/static/components/icons/view-in-browser/index.styl
@@ -2,7 +2,6 @@
display: inline-block;
width: 16px;
height: 19px;
- vertical-align: middle;
margin-left: 4px;
margin-right: 0;
padding: 0 2px;
diff --git a/lib/static/components/section/body/tabs.jsx b/lib/static/components/section/body/tabs.jsx
index 2b5777502..b3a436265 100644
--- a/lib/static/components/section/body/tabs.jsx
+++ b/lib/static/components/section/body/tabs.jsx
@@ -11,7 +11,6 @@ class Tabs extends Component {
id: PropTypes.string.isRequired,
status: PropTypes.string.isRequired,
imageIds: PropTypes.array.isRequired,
- multipleTabs: PropTypes.bool.isRequired,
screenshot: PropTypes.bool.isRequired,
error: PropTypes.object
}).isRequired
@@ -20,7 +19,7 @@ class Tabs extends Component {
_shouldAddErrorTab() {
const {result} = this.props;
- return result.multipleTabs && isErrorStatus(result.status) && !result.screenshot;
+ return isErrorStatus(result.status);
}
_drawTab({key, imageId = null}) {
diff --git a/lib/static/styles.css b/lib/static/styles.css
index 4bea85215..cd0015f02 100644
--- a/lib/static/styles.css
+++ b/lib/static/styles.css
@@ -21,7 +21,7 @@
.report {
font: 15px YS Text, Helvetica Neue, Arial, sans-serif;
- line-height: 20px;
+ line-height: 15px;
margin-bottom: 15px;
}
@@ -320,7 +320,7 @@ main.container {
.section__body .section__title {
font-size: 15px;
- line-height: 20px;
+ line-height: 15px;
}
.section__body .section__title.section__title_type_browser {
@@ -335,7 +335,7 @@ main.container {
.sticky-header__wrap:before {
content: '';
width: 18px;
- height: 16px;
+ height: 18px;
display: inline-block;
margin-right: 5px;
vertical-align: middle;
diff --git a/test/func/common.hermione.conf.js b/test/func/common.hermione.conf.js
index e40b867f1..ee3e07390 100644
--- a/test/func/common.hermione.conf.js
+++ b/test/func/common.hermione.conf.js
@@ -13,7 +13,7 @@ module.exports.getCommonConfig = (projectDir) => ({
desiredCapabilities: {
browserName: 'chrome',
'goog:chromeOptions': {
- args: ['headless', 'no-sandbox'],
+ args: ['headless', 'no-sandbox', 'hide-scrollbars'],
binary: CHROME_BINARY_PATH
}
},
diff --git a/test/func/fixtures/hermione-gui/screens/797c021/chrome/paragraph.png b/test/func/fixtures/hermione-gui/screens/442f53a/chrome/paragraph.png
similarity index 100%
rename from test/func/fixtures/hermione-gui/screens/797c021/chrome/paragraph.png
rename to test/func/fixtures/hermione-gui/screens/442f53a/chrome/paragraph.png
diff --git a/test/func/fixtures/hermione-gui/screens/812d576/chrome/paragraph.png b/test/func/fixtures/hermione-gui/screens/812d576/chrome/paragraph.png
deleted file mode 100644
index e5d168297..000000000
Binary files a/test/func/fixtures/hermione-gui/screens/812d576/chrome/paragraph.png and /dev/null differ
diff --git a/test/func/fixtures/hermione/failed-describe.hermione.js b/test/func/fixtures/hermione/failed-describe.hermione.js
index 9d601ba67..0e9f20c6f 100644
--- a/test/func/fixtures/hermione/failed-describe.hermione.js
+++ b/test/func/fixtures/hermione/failed-describe.hermione.js
@@ -21,6 +21,14 @@ describe('failed describe', function() {
throw new Error(`long_error_message ${'0123456789'.repeat(20)}\n message content`);
});
+ it('test with successful assertView and error', async ({browser}) => {
+ await browser.url(browser.options.baseUrl);
+
+ await browser.assertView('header', 'header');
+
+ throw new Error('Some error');
+ });
+
it.skip('test skipped', async ({browser}) => {
await browser.url(browser.options.baseUrl);
});
diff --git a/test/func/fixtures/hermione/screens/f0c3ac2/chrome/header.png b/test/func/fixtures/hermione/screens/f0c3ac2/chrome/header.png
new file mode 100644
index 000000000..bf8ebcf91
Binary files /dev/null and b/test/func/fixtures/hermione/screens/f0c3ac2/chrome/header.png differ
diff --git a/test/func/fixtures/playwright/tests/failed-describe.spec.ts b/test/func/fixtures/playwright/tests/failed-describe.spec.ts
index d13d89a64..214fbcc22 100644
--- a/test/func/fixtures/playwright/tests/failed-describe.spec.ts
+++ b/test/func/fixtures/playwright/tests/failed-describe.spec.ts
@@ -34,6 +34,14 @@ test.describe('failed describe', () => {
test.skip(true, 'foo-bar');
});
+ test('test with successful assertView and error', async ({page, baseURL}) => {
+ await page.goto(baseURL as string);
+
+ await expect(page.locator('header')).toHaveScreenshot('header-success.png');
+
+ throw new Error('Some error');
+ });
+
test.skip('test skipped', async ({page, baseURL}) => {
await page.goto(baseURL as string);
});
diff --git a/test/func/fixtures/playwright/tests/screens/failed-describe-test-with-successful-assertView-and-error/chromium/header-success.png b/test/func/fixtures/playwright/tests/screens/failed-describe-test-with-successful-assertView-and-error/chromium/header-success.png
new file mode 100644
index 000000000..2baf53cb5
Binary files /dev/null and b/test/func/fixtures/playwright/tests/screens/failed-describe-test-with-successful-assertView-and-error/chromium/header-success.png differ
diff --git a/test/func/tests/common-gui/index.hermione.js b/test/func/tests/common-gui/index.hermione.js
index 6f3d126f4..aee49712e 100644
--- a/test/func/tests/common-gui/index.hermione.js
+++ b/test/func/tests/common-gui/index.hermione.js
@@ -6,7 +6,7 @@ const {promisify} = require('util');
const treeKill = promisify(require('tree-kill'));
const {PORTS} = require('../../utils/constants');
-const {getTestSectionByNameSelector, getSpoilerByNameSelector, getElementWithTextSelector} = require('../utils');
+const {getTestSectionByNameSelector, getSpoilerByNameSelector, getElementWithTextSelector, hideScreenshots} = require('../utils');
const serverHost = process.env.SERVER_HOST ?? 'host.docker.internal';
@@ -139,6 +139,7 @@ describe('GUI mode', () => {
getTestSectionByNameSelector(fullTestName) +
'//button[@data-test-id="retry-switcher"]';
const retrySwitcher = browser.$(`(${allRetryButtonsSelector})[last()]`);
+ await hideScreenshots(browser);
await retrySwitcher.assertView('retry-switcher');
@@ -155,6 +156,7 @@ describe('GUI mode', () => {
);
await retryButton.click();
+ await retryButton.waitForClickable({reverse: true, timeout: 10000});
await retryButton.waitForClickable({timeout: 10000});
// Verify green retry button
@@ -162,6 +164,7 @@ describe('GUI mode', () => {
getTestSectionByNameSelector(fullTestName) +
'//button[@data-test-id="retry-switcher"]';
const retrySwitcher = browser.$(`(${allRetryButtonsSelector})[last()]`);
+ await hideScreenshots(browser);
await retrySwitcher.assertView('retry-switcher');
diff --git a/test/func/tests/common/test-results-appearance.hermione.js b/test/func/tests/common/test-results-appearance.hermione.js
index 303aed572..59de64c1b 100644
--- a/test/func/tests/common/test-results-appearance.hermione.js
+++ b/test/func/tests/common/test-results-appearance.hermione.js
@@ -1,4 +1,10 @@
-const {getTestSectionByNameSelector, getImageSectionSelector, getTestStateByNameSelector, getElementWithTextSelector, hideHeader} = require('../utils');
+const {
+ getTestSectionByNameSelector,
+ getImageSectionSelector,
+ getTestStateByNameSelector,
+ getElementWithTextSelector,
+ hideHeader, hideScreenshots
+} = require('../utils');
describe('Test results appearance', () => {
beforeEach(async ({browser}) => {
@@ -13,6 +19,7 @@ describe('Test results appearance', () => {
);
await hideHeader(browser);
+ await hideScreenshots(browser);
await retrySelectorButton.assertView('retry-selector');
});
@@ -26,6 +33,7 @@ describe('Test results appearance', () => {
);
await hideHeader(browser);
+ await hideScreenshots(browser);
await retrySelectorButton.assertView('retry-selector');
});
@@ -66,7 +74,8 @@ describe('Test results appearance', () => {
);
await hideHeader(browser);
- await browser.execute(() =>{
+ await hideScreenshots(browser);
+ await browser.execute(() => {
window.scrollTo(0, 10000);
});
@@ -106,6 +115,7 @@ describe('Test results appearance', () => {
);
await hideHeader(browser);
+ await hideScreenshots(browser);
await retrySelectorButton.assertView('retry-selector');
});
@@ -121,4 +131,19 @@ describe('Test results appearance', () => {
}
});
});
+
+ describe('Test with successful assertView and error', () => {
+ // eslint-disable-next-line no-undef
+ hermione.only.in('chrome');
+ it('should display error message, name and stack', async ({browser}) => {
+ for (const field of ['message', 'name', 'stack']) {
+ const errorMessage = browser.$(
+ getTestSectionByNameSelector('test with successful assertView and error') +
+ getElementWithTextSelector('span', field) + '/..'
+ );
+
+ await expect(errorMessage).toBeDisplayed();
+ }
+ });
+ });
});
diff --git a/test/func/tests/screens/0049570/chrome/retry-switcher.png b/test/func/tests/screens/0049570/chrome/retry-switcher.png
index d788a5e78..996698da7 100644
Binary files a/test/func/tests/screens/0049570/chrome/retry-switcher.png and b/test/func/tests/screens/0049570/chrome/retry-switcher.png differ
diff --git a/test/func/tests/screens/07c99c0/chrome/retry-switcher.png b/test/func/tests/screens/07c99c0/chrome/retry-switcher.png
index d788a5e78..996698da7 100644
Binary files a/test/func/tests/screens/07c99c0/chrome/retry-switcher.png and b/test/func/tests/screens/07c99c0/chrome/retry-switcher.png differ
diff --git a/test/func/tests/screens/1361a92/chrome-pwt/retry-selector.png b/test/func/tests/screens/1361a92/chrome-pwt/retry-selector.png
index dbf3ade14..7432c9cd0 100644
Binary files a/test/func/tests/screens/1361a92/chrome-pwt/retry-selector.png and b/test/func/tests/screens/1361a92/chrome-pwt/retry-selector.png differ
diff --git a/test/func/tests/screens/1361a92/chrome/retry-selector.png b/test/func/tests/screens/1361a92/chrome/retry-selector.png
index dbf3ade14..7432c9cd0 100644
Binary files a/test/func/tests/screens/1361a92/chrome/retry-selector.png and b/test/func/tests/screens/1361a92/chrome/retry-selector.png differ
diff --git a/test/func/tests/screens/3144090/chrome/menu bar plugins clicked.png b/test/func/tests/screens/3144090/chrome/menu bar plugins clicked.png
index eca819a17..a97118f0c 100644
Binary files a/test/func/tests/screens/3144090/chrome/menu bar plugins clicked.png and b/test/func/tests/screens/3144090/chrome/menu bar plugins clicked.png differ
diff --git a/test/func/tests/screens/42ea26d/chrome-pwt/retry-selector.png b/test/func/tests/screens/42ea26d/chrome-pwt/retry-selector.png
index a40bb6b78..d78257ad8 100644
Binary files a/test/func/tests/screens/42ea26d/chrome-pwt/retry-selector.png and b/test/func/tests/screens/42ea26d/chrome-pwt/retry-selector.png differ
diff --git a/test/func/tests/screens/42ea26d/chrome/retry-selector.png b/test/func/tests/screens/42ea26d/chrome/retry-selector.png
index a40bb6b78..d78257ad8 100644
Binary files a/test/func/tests/screens/42ea26d/chrome/retry-selector.png and b/test/func/tests/screens/42ea26d/chrome/retry-selector.png differ
diff --git a/test/func/tests/screens/45b9477/chrome/retry-switcher.png b/test/func/tests/screens/45b9477/chrome/retry-switcher.png
index 3864eb304..cf2e130cb 100644
Binary files a/test/func/tests/screens/45b9477/chrome/retry-switcher.png and b/test/func/tests/screens/45b9477/chrome/retry-switcher.png differ
diff --git a/test/func/tests/screens/5c90021/chrome/basic plugins.png b/test/func/tests/screens/5c90021/chrome/basic plugins.png
index 7e9ab48f2..5b4481b00 100644
Binary files a/test/func/tests/screens/5c90021/chrome/basic plugins.png and b/test/func/tests/screens/5c90021/chrome/basic plugins.png differ
diff --git a/test/func/tests/screens/67cd8d8/chrome/retry-switcher.png b/test/func/tests/screens/67cd8d8/chrome/retry-switcher.png
index 3864eb304..cf2e130cb 100644
Binary files a/test/func/tests/screens/67cd8d8/chrome/retry-switcher.png and b/test/func/tests/screens/67cd8d8/chrome/retry-switcher.png differ
diff --git a/test/func/tests/screens/972e9ff/chrome/menu bar plugins.png b/test/func/tests/screens/972e9ff/chrome/menu bar plugins.png
index 5bc4221ca..5bc852e4b 100644
Binary files a/test/func/tests/screens/972e9ff/chrome/menu bar plugins.png and b/test/func/tests/screens/972e9ff/chrome/menu bar plugins.png differ
diff --git a/test/func/tests/screens/be4ff5b/chrome/basic plugins clicked.png b/test/func/tests/screens/be4ff5b/chrome/basic plugins clicked.png
index e60537dc7..4c2e132d0 100644
Binary files a/test/func/tests/screens/be4ff5b/chrome/basic plugins clicked.png and b/test/func/tests/screens/be4ff5b/chrome/basic plugins clicked.png differ
diff --git a/test/func/tests/screens/c0db305/chrome-pwt/details summary.png b/test/func/tests/screens/c0db305/chrome-pwt/details summary.png
index 3f884f8ef..375eb098c 100644
Binary files a/test/func/tests/screens/c0db305/chrome-pwt/details summary.png and b/test/func/tests/screens/c0db305/chrome-pwt/details summary.png differ
diff --git a/test/func/tests/screens/c0db305/chrome/details summary.png b/test/func/tests/screens/c0db305/chrome/details summary.png
index 82a84485a..13aa740d6 100644
Binary files a/test/func/tests/screens/c0db305/chrome/details summary.png and b/test/func/tests/screens/c0db305/chrome/details summary.png differ
diff --git a/test/func/tests/screens/d8c5b8a/chrome/redux plugin clicked.png b/test/func/tests/screens/d8c5b8a/chrome/redux plugin clicked.png
index a2c802fe5..ce6b09dc3 100644
Binary files a/test/func/tests/screens/d8c5b8a/chrome/redux plugin clicked.png and b/test/func/tests/screens/d8c5b8a/chrome/redux plugin clicked.png differ
diff --git a/test/func/tests/screens/d90f7de/chrome-pwt/retry-selector.png b/test/func/tests/screens/d90f7de/chrome-pwt/retry-selector.png
index 0ea2a4b54..c74f4a81c 100644
Binary files a/test/func/tests/screens/d90f7de/chrome-pwt/retry-selector.png and b/test/func/tests/screens/d90f7de/chrome-pwt/retry-selector.png differ
diff --git a/test/func/tests/screens/d90f7de/chrome/retry-selector.png b/test/func/tests/screens/d90f7de/chrome/retry-selector.png
index 052cdd571..c74f4a81c 100644
Binary files a/test/func/tests/screens/d90f7de/chrome/retry-selector.png and b/test/func/tests/screens/d90f7de/chrome/retry-selector.png differ
diff --git a/test/func/tests/screens/ff4deba/chrome-pwt/retry-selector.png b/test/func/tests/screens/ff4deba/chrome-pwt/retry-selector.png
index cf8509857..d78257ad8 100644
Binary files a/test/func/tests/screens/ff4deba/chrome-pwt/retry-selector.png and b/test/func/tests/screens/ff4deba/chrome-pwt/retry-selector.png differ
diff --git a/test/func/tests/screens/ff4deba/chrome/retry-selector.png b/test/func/tests/screens/ff4deba/chrome/retry-selector.png
index a40bb6b78..d78257ad8 100644
Binary files a/test/func/tests/screens/ff4deba/chrome/retry-selector.png and b/test/func/tests/screens/ff4deba/chrome/retry-selector.png differ
diff --git a/test/func/tests/utils.js b/test/func/tests/utils.js
index 1f9489479..5d045f93e 100644
--- a/test/func/tests/utils.js
+++ b/test/func/tests/utils.js
@@ -20,11 +20,20 @@ const hideHeader = async (browser) => {
});
};
+const hideScreenshots = async (browser) => {
+ await browser.execute(() => {
+ document.querySelectorAll('.image-box__image').forEach(el => {
+ el.style.display = 'none';
+ });
+ });
+};
+
module.exports = {
getTestSectionByNameSelector,
getTestStateByNameSelector,
getImageSectionSelector,
getElementWithTextSelector,
getSpoilerByNameSelector,
- hideHeader
+ hideHeader,
+ hideScreenshots
};
diff --git a/test/unit/lib/static/components/section/body/tabs.jsx b/test/unit/lib/static/components/section/body/tabs.jsx
index 9f1ea971f..b1e4c8b25 100644
--- a/test/unit/lib/static/components/section/body/tabs.jsx
+++ b/test/unit/lib/static/components/section/body/tabs.jsx
@@ -1,7 +1,7 @@
import React from 'react';
import proxyquire from 'proxyquire';
import {defaultsDeep} from 'lodash';
-import {ERROR, SUCCESS} from 'lib/constants/test-statuses';
+import {ERROR, FAIL, SUCCESS} from 'lib/constants/test-statuses';
import {mkConnectedComponent} from '../../utils';
describe('', () => {
@@ -13,9 +13,7 @@ describe('', () => {
result: {
id: 'default-result-id',
status: SUCCESS,
- imageIds: [],
- multipleTabs: true,
- screenshot: true
+ imageIds: []
}
});
@@ -64,7 +62,7 @@ describe('', () => {
});
it('should render image tab for each image id', () => {
- const result = {status: ERROR, imageIds: ['img-1', 'img-2']};
+ const result = {status: FAIL, imageIds: ['img-1', 'img-2']};
const component = mkTabs({result});
@@ -75,7 +73,7 @@ describe('', () => {
});
it('should not render additional error tab if test errored with screenshot on reject', () => {
- const result = {status: ERROR, imageIds: ['img-1'], screenshot: true};
+ const result = {status: FAIL, imageIds: ['img-1'], screenshot: true};
const component = mkTabs({result});