test: reenable disabled GHA windows tests (#45075)

* test: renable GHA on Windows disabled tests

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* test: close edge after shell.openExternal

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* test: close edge sync after shell.openExternal

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:
trop[bot] 2025-01-06 12:49:16 -05:00 committed by GitHub
commit 1ecc57465d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 7 deletions

View file

@ -3,6 +3,7 @@ import { BrowserWindow, app } from 'electron/main';
import { expect } from 'chai';
import { execSync } from 'node:child_process';
import { once } from 'node:events';
import * as fs from 'node:fs';
import * as http from 'node:http';
@ -17,6 +18,15 @@ describe('shell module', () => {
let envVars: Record<string, string | undefined> = {};
let server: http.Server;
after(function () {
this.timeout(60000);
if (process.env.CI && process.platform === 'win32') {
// Edge may cause issues with visibility tests, so make sure it is closed after testing.
const killEdge = 'Get-Process | Where Name -Like "msedge" | Stop-Process';
execSync(killEdge, { shell: 'powershell.exe' });
}
});
beforeEach(function () {
envVars = {
display: process.env.DISPLAY,