diff --git a/packages/frontend/electron/src/main/application-menu/create.ts b/packages/frontend/electron/src/main/application-menu/create.ts index 0120646f8ab4..016dac844c3c 100644 --- a/packages/frontend/electron/src/main/application-menu/create.ts +++ b/packages/frontend/electron/src/main/application-menu/create.ts @@ -139,22 +139,19 @@ export function createApplicationMenu() { undoCloseTab().catch(console.error); }, }, - { - label: 'Switch to tab', - acceleratorWorksWhenHidden: true, - visible: false, - submenu: [1, 2, 3, 4, 5, 6, 7, 8, 9].map(n => { - const shortcut = `CommandOrControl+${n}`; - const listener = () => { - switchTab(n); - }; - return { - label: `Switch to tab ${n}`, - accelerator: shortcut, - click: listener, - }; - }), - }, + ...[1, 2, 3, 4, 5, 6, 7, 8, 9].map(n => { + const shortcut = `CommandOrControl+${n}`; + const listener = () => { + switchTab(n); + }; + return { + acceleratorWorksWhenHidden: true, + label: `Switch to tab ${n}`, + accelerator: shortcut, + click: listener, + visible: false, + }; + }), ], }, { diff --git a/tests/affine-desktop/e2e/tabs.spec.ts b/tests/affine-desktop/e2e/tabs.spec.ts index 0d2b3f6864e6..e1a1c7a47971 100644 --- a/tests/affine-desktop/e2e/tabs.spec.ts +++ b/tests/affine-desktop/e2e/tabs.spec.ts @@ -154,7 +154,9 @@ async function enableSplitView(page: Page) { }) ); }); - await page.reload(); + await page.reload({ + timeout: 30000, + }); } test('open new tab via cmd+click page link', async ({ page }) => {