mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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:
committed by
Andrey Lushnikov
parent
41ccd0bded
commit
8e12d197a2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user