diff --git a/app/lib/menu/menu-builder.js b/app/lib/menu/menu-builder.js index cce97fa7a1..59d88e2fcf 100644 --- a/app/lib/menu/menu-builder.js +++ b/app/lib/menu/menu-builder.js @@ -94,13 +94,9 @@ class MenuBuilder { const { contextMenu } = this.options.state; if (this.options.type === 'tab') { - return this.appendNewFile() + return this.appendContextCloseTab() .appendSeparator() - .appendContextCloseTab() - .appendSeparator() - .appendContextRevealInFileExplorerTab() - .appendSeparator() - .appendOpenRecent(); + .appendContextRevealInFileExplorerTab(); } if (contextMenu) { diff --git a/app/test/spec/menu/menu-builder-spec.js b/app/test/spec/menu/menu-builder-spec.js index 36eb183905..fdd4c80e04 100644 --- a/app/test/spec/menu/menu-builder-spec.js +++ b/app/test/spec/menu/menu-builder-spec.js @@ -67,6 +67,13 @@ describe('MenuBuilder', () => { const contextMenu = menuBuilder.buildContextMenu(); expect(contextMenu).to.exist; + expectMenu(contextMenu, [ + 'Close Tab', + 'Close All Tabs', + 'Close Other Tabs', + undefined, + 'Reveal in File Explorer' + ]); }); @@ -532,3 +539,9 @@ function callAction(fn, browserWindow = {}, triggeredByAccelerator = false) { return fn(null, browserWindow, { triggeredByAccelerator }); } + +function expectMenu(actual, expected) { + const menu = actual.menu.map(item => item.label); + + expect(menu).to.eql(expected); +} \ No newline at end of file