mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
test: unflake some focus tests (#34079)
* spec: unflake some focus tests * test: disable flaky webFrame visibiilty spec Co-authored-by: Samuel Attard <sattard@salesforce.com>
This commit is contained in:
@@ -694,12 +694,12 @@ describe('BrowserWindow module', () => {
|
||||
});
|
||||
|
||||
describe('BrowserWindow.show()', () => {
|
||||
it('should focus on window', () => {
|
||||
w.show();
|
||||
it('should focus on window', async () => {
|
||||
await emittedOnce(w, 'focus', () => w.show());
|
||||
expect(w.isFocused()).to.equal(true);
|
||||
});
|
||||
it('should make the window visible', () => {
|
||||
w.show();
|
||||
it('should make the window visible', async () => {
|
||||
await emittedOnce(w, 'focus', () => w.show());
|
||||
expect(w.isVisible()).to.equal(true);
|
||||
});
|
||||
it('emits when window is shown', async () => {
|
||||
@@ -895,7 +895,7 @@ describe('BrowserWindow module', () => {
|
||||
|
||||
describe('BrowserWindow.getFocusedWindow()', () => {
|
||||
it('returns the opener window when dev tools window is focused', async () => {
|
||||
w.show();
|
||||
await emittedOnce(w, 'focus', () => w.show());
|
||||
w.webContents.openDevTools({ mode: 'undocked' });
|
||||
await emittedOnce(w.webContents, 'devtools-focused');
|
||||
expect(BrowserWindow.getFocusedWindow()).to.equal(w);
|
||||
|
||||
@@ -137,7 +137,9 @@ describe('webFrameMain module', () => {
|
||||
});
|
||||
|
||||
describe('WebFrame.visibilityState', () => {
|
||||
it('should match window state', async () => {
|
||||
// TODO(MarshallOfSound): Fix flaky test
|
||||
// @flaky-test
|
||||
it.skip('should match window state', async () => {
|
||||
const w = new BrowserWindow({ show: true });
|
||||
await w.loadURL('about:blank');
|
||||
const webFrame = w.webContents.mainFrame;
|
||||
|
||||
Reference in New Issue
Block a user