@@ -247,13 +247,13 @@ describe("DesktopApplicationMenu", () => {
247247 } ) ,
248248 ) ;
249249
250- it . effect ( "routes View menu zoom to the main window instead of zoom roles " , ( ) =>
250+ it . effect ( "registers macOS command-plus once and routes it through main- window zoom" , ( ) =>
251251 Effect . gen ( function * ( ) {
252252 const selectedAction = yield * Deferred . make < string > ( ) ;
253253 const applicationMenuTemplate =
254254 yield * Deferred . make < readonly Electron . MenuItemConstructorOptions [ ] > ( ) ;
255255
256- yield * configureMenu ( selectedAction , applicationMenuTemplate ) ;
256+ yield * configureMenu ( selectedAction , applicationMenuTemplate , { platform : "darwin" } ) ;
257257
258258 const template = yield * Deferred . await ( applicationMenuTemplate ) ;
259259 const viewMenu = template . find ( ( item ) => item . label === "View" ) ;
@@ -268,9 +268,17 @@ describe("DesktopApplicationMenu", () => {
268268 ) ,
269269 ) ;
270270
271- const zoomIn = viewMenu . submenu . find ( ( item ) => item . label === "Zoom In" ) ;
271+ const shiftedEqual = viewMenu . submenu . filter (
272+ ( item ) => item . accelerator === "CmdOrCtrl+Shift+=" ,
273+ ) ;
274+ assert . lengthOf ( shiftedEqual , 1 ) ;
275+ assert . lengthOf (
276+ viewMenu . submenu . filter ( ( item ) => item . accelerator === "CmdOrCtrl+numadd" ) ,
277+ 1 ,
278+ ) ;
279+ const zoomIn = shiftedEqual [ 0 ] ;
272280 assert . isDefined ( zoomIn ) ;
273- assert . equal ( zoomIn . accelerator , "CmdOrCtrl+=" ) ;
281+ assert . isFalse ( zoomIn . visible ) ;
274282 if ( typeof zoomIn . click !== "function" ) {
275283 throw new Error ( "Expected Zoom In menu item to have a click handler." ) ;
276284 }
0 commit comments