Migrate some application menu items to injectables

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
Iku-tursoandJanne Savolainen authored and Janne Savolainen committed 2022-10-20 08:36:19 +03:00
1 parent 18c2cdf851
commit 88ea157352
28 files changed
+805 -106

No files matched your search

@@ -0,0 +1,399 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`application-menu given enough time passes populates application menu janne 1`] = `
Array [
Array [
Array [
Object {
"id": "root",
"label": "some-product-name",
"submenu": Array [
Object {
"id": "primary",
"label": "some-product-name",
"parentId": null,
},
Object {
"click": [Function],
"id": "about",
"label": "About some-product-name",
"parentId": "primary",
},
Object {
"type": "separator",
},
Object {
"accelerator": "CmdOrCtrl+,",
"click": [Function],
"id": "preferences",
"label": "Preferences",
},
Object {
"accelerator": "CmdOrCtrl+Shift+E",
"click": [Function],
"id": "extensions",
"label": "Extensions",
},
Object {
"type": "separator",
},
Object {
"role": "services",
},
Object {
"type": "separator",
},
Object {
"role": "hide",
},
Object {
"role": "hideOthers",
},
Object {
"role": "unhide",
},
Object {
"type": "separator",
},
Object {
"accelerator": "Cmd+Q",
"click": [Function],
"id": "quit",
"label": "Quit",
},
],
},
Object {
"id": "file",
"label": "File",
"submenu": Array [
Object {
"accelerator": "CmdOrCtrl+Shift+A",
"click": [Function],
"id": "add-cluster",
"label": "Add Cluster",
},
Object {
"type": "separator",
},
Object {
"accelerator": "Shift+Cmd+W",
"label": "Close Window",
"role": "close",
},
],
},
Object {
"id": "edit",
"label": "Edit",
"submenu": Array [
Object {
"role": "undo",
},
Object {
"role": "redo",
},
Object {
"type": "separator",
},
Object {
"role": "cut",
},
Object {
"role": "copy",
},
Object {
"role": "paste",
},
Object {
"role": "delete",
},
Object {
"type": "separator",
},
Object {
"role": "selectAll",
},
],
},
Object {
"id": "view",
"label": "View",
"submenu": Array [
Object {
"accelerator": "Shift+CmdOrCtrl+C",
"click": [Function],
"id": "catalog",
"label": "Catalog",
},
Object {
"accelerator": "Shift+CmdOrCtrl+P",
"click": [Function],
"id": "command-palette",
"label": "Command Palette...",
},
Object {
"type": "separator",
},
Object {
"accelerator": "CmdOrCtrl+[",
"click": [Function],
"id": "go-back",
"label": "Back",
},
Object {
"accelerator": "CmdOrCtrl+]",
"click": [Function],
"id": "go-forward",
"label": "Forward",
},
Object {
"accelerator": "CmdOrCtrl+R",
"click": [Function],
"id": "reload",
"label": "Reload",
},
Object {
"role": "toggleDevTools",
},
Object {
"type": "separator",
},
Object {
"role": "resetZoom",
},
Object {
"role": "zoomIn",
},
Object {
"role": "zoomOut",
},
Object {
"type": "separator",
},
Object {
"role": "togglefullscreen",
},
],
},
Object {
"id": "help",
"role": "help",
"submenu": Array [
Object {
"click": [Function],
"id": "welcome",
"label": "Welcome",
},
Object {
"click": [Function],
"id": "documentation",
"label": "Documentation",
},
Object {
"click": [Function],
"id": "support",
"label": "Support",
},
],
},
],
],
]
`;
exports[`application-menu given enough time passes populates application menu lol 1`] = `
Array [
Array [
Array [
Object {
"id": "root",
"label": "some-product-name",
"submenu": Array [
Object {
"click": [Function],
"id": "about",
"label": "About some-product-name",
},
Object {
"type": "separator",
},
Object {
"accelerator": "CmdOrCtrl+,",
"click": [Function],
"id": "preferences",
"label": "Preferences",
},
Object {
"accelerator": "CmdOrCtrl+Shift+E",
"click": [Function],
"id": "extensions",
"label": "Extensions",
},
Object {
"type": "separator",
},
Object {
"role": "services",
},
Object {
"type": "separator",
},
Object {
"role": "hide",
},
Object {
"role": "hideOthers",
},
Object {
"role": "unhide",
},
Object {
"type": "separator",
},
Object {
"accelerator": "Cmd+Q",
"click": [Function],
"id": "quit",
"label": "Quit",
},
],
},
Object {
"id": "file",
"label": "File",
"submenu": Array [
Object {
"accelerator": "CmdOrCtrl+Shift+A",
"click": [Function],
"id": "add-cluster",
"label": "Add Cluster",
},
Object {
"type": "separator",
},
Object {
"accelerator": "Shift+Cmd+W",
"label": "Close Window",
"role": "close",
},
],
},
Object {
"id": "edit",
"label": "Edit",
"submenu": Array [
Object {
"role": "undo",
},
Object {
"role": "redo",
},
Object {
"type": "separator",
},
Object {
"role": "cut",
},
Object {
"role": "copy",
},
Object {
"role": "paste",
},
Object {
"role": "delete",
},
Object {
"type": "separator",
},
Object {
"role": "selectAll",
},
],
},
Object {
"id": "view",
"label": "View",
"submenu": Array [
Object {
"accelerator": "Shift+CmdOrCtrl+C",
"click": [Function],
"id": "catalog",
"label": "Catalog",
},
Object {
"accelerator": "Shift+CmdOrCtrl+P",
"click": [Function],
"id": "command-palette",
"label": "Command Palette...",
},
Object {
"type": "separator",
},
Object {
"accelerator": "CmdOrCtrl+[",
"click": [Function],
"id": "go-back",
"label": "Back",
},
Object {
"accelerator": "CmdOrCtrl+]",
"click": [Function],
"id": "go-forward",
"label": "Forward",
},
Object {
"accelerator": "CmdOrCtrl+R",
"click": [Function],
"id": "reload",
"label": "Reload",
},
Object {
"role": "toggleDevTools",
},
Object {
"type": "separator",
},
Object {
"role": "resetZoom",
},
Object {
"role": "zoomIn",
},
Object {
"role": "zoomOut",
},
Object {
"type": "separator",
},
Object {
"role": "togglefullscreen",
},
],
},
Object {
"id": "help",
"role": "help",
"submenu": Array [
Object {
"click": [Function],
"id": "welcome",
"label": "Welcome",
},
Object {
"click": [Function],
"id": "documentation",
"label": "Documentation",
},
Object {
"click": [Function],
"id": "support",
"label": "Support",
},
],
},
],
],
]
`;