fix(tests): normalize scrollbars in headful tests (#2622)

Scrollbars look different on different platforms, so must be made invisible in tests. As a drive-by, xdescribe was broken with the new test runner.

References #2524
This commit is contained in:
Joel Einbinder
2018-05-29 15:30:08 -07:00
committed by Andrey Lushnikov
parent 41ccd0bded
commit 8e12d197a2
4 changed files with 15 additions and 1 deletions

View File

@@ -295,7 +295,11 @@ class TestRunner extends EventEmitter {
}
_addTest(mode, name, callback) {
const test = new Test(this._currentSuite, name, callback, mode, this._timeout);
let suite = this._currentSuite;
let isSkipped = suite.declaredMode === TestMode.Skip;
while ((suite = suite.parentSuite))
isSkipped |= suite.declaredMode === TestMode.Skip;
const test = new Test(this._currentSuite, name, callback, isSkipped ? TestMode.Skip : mode, this._timeout);
this._currentSuite.children.push(test);
this._tests.push(test);
this._hasFocusedTestsOrSuites = this._hasFocusedTestsOrSuites || mode === TestMode.Focus;