test: reenable disabled GHA windows tests (#45062)

* test: renable GHA on Windows disabled tests

* test: close edge after shell.openExternal

* test: close edge sync after shell.openExternal
This commit is contained in:
John Kleinschmidt 2024-12-20 19:49:55 +00:00 committed by GitHub
parent 1ecb2a2998
commit 2745771a22
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,