fix: css transparent background being lost (#32593)

This commit is contained in:
Shelley Vohr 2022-01-27 15:56:35 +01:00 committed by GitHub
parent 86f8faea6b
commit 3768a7b25f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 836 additions and 5 deletions

View file

@ -1649,7 +1649,15 @@ describe('BrowserWindow module', () => {
});
ifdescribe(process.platform === 'darwin')('BrowserWindow.setVibrancy(type)', () => {
afterEach(closeAllWindows);
let appProcess: childProcess.ChildProcessWithoutNullStreams | undefined;
afterEach(() => {
if (appProcess && !appProcess.killed) {
appProcess.kill();
appProcess = undefined;
}
closeAllWindows();
});
it('allows setting, changing, and removing the vibrancy', () => {
const w = new BrowserWindow({ show: false });
@ -1668,6 +1676,15 @@ describe('BrowserWindow module', () => {
w.setVibrancy('i-am-not-a-valid-vibrancy-type' as any);
}).to.not.throw();
});
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]);
const [code] = await emittedOnce(appProcess, 'exit');
expect(code).to.equal(0);
});
});
ifdescribe(process.platform === 'darwin')('trafficLightPosition', () => {