perf: optimize app startup and background lifecycles
This commit is contained in:
@@ -2,16 +2,18 @@ import { describe, expect, it } from 'vitest';
|
||||
import { getNativeWindowMaterialOptions } from '../../electron/main/window-material';
|
||||
|
||||
describe('native window material', () => {
|
||||
it('enables transparent under-window vibrancy on macOS', () => {
|
||||
it('uses the same opaque light surface on macOS', () => {
|
||||
expect(getNativeWindowMaterialOptions('darwin')).toEqual({
|
||||
backgroundColor: '#00000000',
|
||||
transparent: true,
|
||||
vibrancy: 'under-window',
|
||||
visualEffectState: 'active',
|
||||
backgroundColor: '#FFFFFF',
|
||||
transparent: false,
|
||||
visualEffectState: 'inactive',
|
||||
});
|
||||
});
|
||||
|
||||
it.each(['win32', 'linux', 'freebsd'] as const)('keeps %s on the opaque fallback', (platform) => {
|
||||
expect(getNativeWindowMaterialOptions(platform)).toEqual({});
|
||||
it.each(['win32', 'linux', 'freebsd'] as const)('uses the opaque fallback on %s', (platform) => {
|
||||
expect(getNativeWindowMaterialOptions(platform)).toEqual({
|
||||
backgroundColor: '#FFFFFF',
|
||||
transparent: false,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user