Skip to content

Commit 2cafca0

Browse files
committed
filter more accelerators for linux
1 parent 2ef8483 commit 2cafca0

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

packages/compass/src/main/menu.spec.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { MenuItemConstructorOptions } from 'electron';
33
import { BrowserWindow, ipcMain, Menu, app, dialog } from 'electron';
44
import { expect } from 'chai';
55
import sinon from 'sinon';
6+
import os from 'os';
67
import { createSandboxFromDefaultPreferences } from 'compass-preferences-model';
78

89
import type { CompassApplication } from './application';
@@ -696,7 +697,12 @@ describe('CompassMenu', function () {
696697
label: '&Collection',
697698
submenu: [
698699
{
699-
accelerator: 'Alt+CmdOrCtrl+S',
700+
// TODO(COMPASS-8505): Add `accelerator` back to this
701+
...(os.platform() === 'linux'
702+
? {}
703+
: {
704+
accelerator: 'Alt+CmdOrCtrl+S',
705+
}),
700706
label: '&Share Schema as JSON',
701707
},
702708
{
@@ -730,7 +736,12 @@ describe('CompassMenu', function () {
730736
label: '&Collection',
731737
submenu: [
732738
{
733-
accelerator: 'Alt+CmdOrCtrl+S',
739+
// TODO(COMPASS-8505): Add `accelerator` back to this
740+
...(os.platform() === 'linux'
741+
? {}
742+
: {
743+
accelerator: 'Alt+CmdOrCtrl+S',
744+
}),
734745
label: '&Share Schema as JSON',
735746
},
736747
{
@@ -754,7 +765,12 @@ describe('CompassMenu', function () {
754765
expect(
755766
menu.find((item: any) => item.label === '&Toggle DevTools')
756767
).to.deep.eq({
757-
accelerator: 'Alt+CmdOrCtrl+I',
768+
// TODO(COMPASS-8505): Add `accelerator` back to this
769+
...(os.platform() === 'linux'
770+
? {}
771+
: {
772+
accelerator: 'Alt+CmdOrCtrl+I',
773+
}),
758774
label: '&Toggle DevTools',
759775
});
760776
});

0 commit comments

Comments
 (0)