perf: optimize app startup and background lifecycles
This commit is contained in:
1 parent
31332f6d76
commit
927e13349b
121 files changed
+4359
-1400
No files matched your search
@@ -24,7 +24,7 @@ async function readPopupStyles(page: Awaited<ReturnType<typeof getStableWindow>>
|
||||
}
|
||||
|
||||
test.describe('shared popup rendering cost', () => {
|
||||
test('disables transient popup backdrop filters only on macOS', async ({ launchElectronApp }) => {
|
||||
test('disables transient popup backdrop filters on every platform', async ({ launchElectronApp }) => {
|
||||
const app = await launchElectronApp({ skipSetup: true });
|
||||
|
||||
try {
|
||||
@@ -41,9 +41,6 @@ test.describe('shared popup rendering cost', () => {
|
||||
await page.getByTestId('settings-reveal-additional').click();
|
||||
await expect(page.getByRole('dialog')).toBeVisible();
|
||||
|
||||
await page.evaluate(() => {
|
||||
document.documentElement.dataset.platform = 'darwin';
|
||||
});
|
||||
await expect.poll(() => readPopupStyles(page)).toEqual({
|
||||
contentBackdropFilter: 'none',
|
||||
overlayBackdropFilter: 'none',
|
||||
@@ -52,9 +49,10 @@ test.describe('shared popup rendering cost', () => {
|
||||
await page.evaluate(() => {
|
||||
document.documentElement.dataset.platform = 'win32';
|
||||
});
|
||||
const nonMacStyles = await readPopupStyles(page);
|
||||
expect(nonMacStyles.contentBackdropFilter).not.toBe('none');
|
||||
expect(nonMacStyles.overlayBackdropFilter).not.toBe('none');
|
||||
await expect.poll(() => readPopupStyles(page)).toEqual({
|
||||
contentBackdropFilter: 'none',
|
||||
overlayBackdropFilter: 'none',
|
||||
});
|
||||
} finally {
|
||||
await app.evaluate(({ app: electronApp }) => electronApp.quit());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user