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:
parent
41ccd0bded
commit
8e12d197a2
@ -7,6 +7,9 @@ body iframe {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
::-webkit-scrollbar{
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
async function attachFrame(frameId, url) {
|
||||
|
@ -45,4 +45,8 @@ body {
|
||||
box-sizing: border-box;
|
||||
border: 1px solid darkgray;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
@ -222,6 +222,9 @@ module.exports.addTests = function({testRunner, expect}) {
|
||||
height: 600px;
|
||||
margin-left: 50px;
|
||||
}
|
||||
::-webkit-scrollbar{
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="to-screenshot"></div>
|
||||
`);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user