diff --git a/spec/api-shell.spec.ts b/spec/api-shell.spec.ts index f24785ce01..14a84e0cb2 100644 --- a/spec/api-shell.spec.ts +++ b/spec/api-shell.spec.ts @@ -14,7 +14,7 @@ import { ifdescribe, ifit, listen } from './lib/spec-helpers.ts'; import { closeAllWindows } from './lib/window-helpers.ts'; describe('shell module', () => { - describe('shell.openExternal()', () => { + describe('shell.openExternal()', { tags: ['serial'] }, () => { let envVars: Record = {}; let server: http.Server; diff --git a/spec/api-web-contents-view.spec.ts b/spec/api-web-contents-view.spec.ts index f38a044d6a..6e3cc0d897 100644 --- a/spec/api-web-contents-view.spec.ts +++ b/spec/api-web-contents-view.spec.ts @@ -603,7 +603,7 @@ describe('WebContentsView', () => { }); }); - describe('focusOnNavigation webPreference', () => { + describe('focusOnNavigation webPreference', { tags: ['serial'] }, () => { it('focuses the webContents on navigation by default', async () => { const w = new BrowserWindow(); await once(w, 'focus'); @@ -614,7 +614,9 @@ describe('WebContentsView', () => { v.webContents.openDevTools({ mode: 'right' }); await devToolsFocused; expect(v.webContents.isFocused()).to.be.false(); + const focused = once(v.webContents, 'focus'); await v.webContents.loadURL('data:text/html,test'); + await focused; expect(v.webContents.isFocused()).to.be.true(); });