test: fix background transparency flake (#34190)
This commit is contained in:
parent
d67532ee9f
commit
ba3aca8200
2 changed files with 6 additions and 2 deletions
|
@ -1828,7 +1828,7 @@ describe('BrowserWindow module', () => {
|
|||
});
|
||||
|
||||
ifdescribe(process.platform === 'darwin')('BrowserWindow.setVibrancy(type)', () => {
|
||||
let appProcess: childProcess.ChildProcessWithoutNullStreams | undefined;
|
||||
let appProcess: childProcess.ChildProcessWithoutNullStreams | childProcess.ChildProcess | undefined;
|
||||
|
||||
afterEach(() => {
|
||||
if (appProcess && !appProcess.killed) {
|
||||
|
@ -1859,7 +1859,9 @@ describe('BrowserWindow module', () => {
|
|||
it('Allows setting a transparent window via CSS', async () => {
|
||||
const appPath = path.join(__dirname, 'fixtures', 'apps', 'background-color-transparent');
|
||||
|
||||
appProcess = childProcess.spawn(process.execPath, [appPath]);
|
||||
appProcess = childProcess.spawn(process.execPath, [appPath], {
|
||||
stdio: 'inherit'
|
||||
});
|
||||
|
||||
const [code] = await emittedOnce(appProcess, 'exit');
|
||||
expect(code).to.equal(0);
|
||||
|
|
|
@ -21,6 +21,7 @@ async function createWindow () {
|
|||
transparent: true,
|
||||
vibrancy: 'under-window',
|
||||
webPreferences: {
|
||||
backgroundThrottling: false,
|
||||
contextIsolation: false,
|
||||
nodeIntegration: true
|
||||
}
|
||||
|
@ -43,6 +44,7 @@ ipcMain.on('set-transparent', async () => {
|
|||
colors.transparent = result[0].hex();
|
||||
|
||||
const { green, transparent } = colors;
|
||||
console.log({ green, transparent });
|
||||
process.exit(green === transparent ? 1 : 0);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue