test: fixup flaky tests (#44379)
* test: fixup flaky test Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * test: disable flaky protocol speed test on macOS Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * test: fixup flaky test in api-browser-window-spec.ts Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
parent
b9b982cd7d
commit
1d0cd8bf59
3 changed files with 14 additions and 9 deletions
|
@ -15,7 +15,7 @@ import * as path from 'node:path';
|
|||
import { setTimeout } from 'node:timers/promises';
|
||||
import * as url from 'node:url';
|
||||
|
||||
import { ifit, ifdescribe, defer, itremote, listen, startRemoteControlApp } from './lib/spec-helpers';
|
||||
import { ifit, ifdescribe, defer, itremote, listen, startRemoteControlApp, waitUntil } from './lib/spec-helpers';
|
||||
import { closeAllWindows } from './lib/window-helpers';
|
||||
import { PipeTransport } from './pipe-transport';
|
||||
|
||||
|
@ -2944,10 +2944,12 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', ()
|
|||
);
|
||||
await once(w.webContents, 'leave-html-full-screen');
|
||||
|
||||
const width = await w.webContents.executeJavaScript(
|
||||
"document.querySelector('iframe').offsetWidth"
|
||||
);
|
||||
expect(width).to.equal(0);
|
||||
await expect(waitUntil(async () => {
|
||||
const width = await w.webContents.executeJavaScript(
|
||||
"document.querySelector('iframe').offsetWidth"
|
||||
);
|
||||
return width === 0;
|
||||
})).to.eventually.be.fulfilled();
|
||||
|
||||
w.setFullScreen(false);
|
||||
await once(w, 'leave-full-screen');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue