Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 25 additions & 27 deletions TableProTests/Core/Menu/ChromeSnapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
{"path": "File", "separator": true},
{"path": "File > Backup Dump…", "action": "backupDatabase:"},
{"path": "File > Restore Dump…", "action": "restoreDatabase:"},
{"path": "File > Server-Side Export…", "action": "serverSideExport:"},
{"path": "Edit"},
{"path": "Edit > Undo", "identifier": "shortcut.undo", "action": "undo:", "key": "z", "modifiers": ["command"]},
{"path": "Edit > Redo", "identifier": "shortcut.redo", "action": "redo:", "key": "z", "modifiers": ["shift", "command"]},
Expand Down Expand Up @@ -96,35 +95,35 @@
{"path": "Edit", "separator": true},
{"path": "Edit > Restore Previous Values…", "identifier": "shortcut.restorePreviousValues", "action": "restorePreviousValues:"},
{"path": "Edit", "separator": true},
{"path": "Edit > Data"},
{"path": "Edit > Data > Insert Row Above", "action": "dataFileInsertRowAbove:"},
{"path": "Edit > Data > Insert Row Below", "action": "dataFileInsertRowBelow:"},
{"path": "Edit > Data > Delete Rows", "action": "dataFileDeleteSelectedRows:"},
{"path": "Edit > Data", "identifier": "edit.data", "hidden": true},
{"path": "Edit > Data > Insert Row Above", "action": "dataFileInsertRowAbove:", "hidden": true},
{"path": "Edit > Data > Insert Row Below", "action": "dataFileInsertRowBelow:", "hidden": true},
{"path": "Edit > Data > Delete Rows", "action": "dataFileDeleteSelectedRows:", "hidden": true},
{"path": "Edit > Data", "separator": true},
{"path": "Edit > Data > Add Column…", "action": "dataFileAddColumn:"},
{"path": "Edit > Data > Insert Column Left", "action": "dataFileInsertColumnLeft:"},
{"path": "Edit > Data > Insert Column Right", "action": "dataFileInsertColumnRight:"},
{"path": "Edit > Data > Rename Column…", "action": "dataFileRenameColumn:"},
{"path": "Edit > Data > Split Column…", "action": "dataFileSplitColumn:"},
{"path": "Edit > Data > Merge Columns…", "action": "dataFileMergeColumns:"},
{"path": "Edit > Data > Delete Column", "action": "dataFileDeleteColumn:"},
{"path": "Edit > Data > Add Column…", "action": "dataFileAddColumn:", "hidden": true},
{"path": "Edit > Data > Insert Column Left", "action": "dataFileInsertColumnLeft:", "hidden": true},
{"path": "Edit > Data > Insert Column Right", "action": "dataFileInsertColumnRight:", "hidden": true},
{"path": "Edit > Data > Rename Column…", "action": "dataFileRenameColumn:", "hidden": true},
{"path": "Edit > Data > Split Column…", "action": "dataFileSplitColumn:", "hidden": true},
{"path": "Edit > Data > Merge Columns…", "action": "dataFileMergeColumns:", "hidden": true},
{"path": "Edit > Data > Delete Column", "action": "dataFileDeleteColumn:", "hidden": true},
{"path": "Edit > Data", "separator": true},
{"path": "Edit > Data > Fill Down", "action": "dataFileFillDown:"},
{"path": "Edit > Data > Set Cells to Value…", "action": "dataFileSetCellsToValue:"},
{"path": "Edit > Data > Trim Whitespace", "action": "dataFileTrimWhitespace:"},
{"path": "Edit > Data > Change Case"},
{"path": "Edit > Data > Change Case > UPPERCASE", "action": "dataFileChangeCase:"},
{"path": "Edit > Data > Change Case > lowercase", "action": "dataFileChangeCase:"},
{"path": "Edit > Data > Change Case > Title Case", "action": "dataFileChangeCase:"},
{"path": "Edit > Data > Replace in Column…", "action": "dataFileReplaceInColumn:"},
{"path": "Edit > Data > Remove Duplicate Rows…", "action": "dataFileRemoveDuplicates:"},
{"path": "Edit > Data > Fill Down", "action": "dataFileFillDown:", "hidden": true},
{"path": "Edit > Data > Set Cells to Value…", "action": "dataFileSetCellsToValue:", "hidden": true},
{"path": "Edit > Data > Trim Whitespace", "action": "dataFileTrimWhitespace:", "hidden": true},
{"path": "Edit > Data > Change Case", "hidden": true},
{"path": "Edit > Data > Change Case > UPPERCASE", "action": "dataFileChangeCase:", "hidden": true},
{"path": "Edit > Data > Change Case > lowercase", "action": "dataFileChangeCase:", "hidden": true},
{"path": "Edit > Data > Change Case > Title Case", "action": "dataFileChangeCase:", "hidden": true},
{"path": "Edit > Data > Replace in Column…", "action": "dataFileReplaceInColumn:", "hidden": true},
{"path": "Edit > Data > Remove Duplicate Rows…", "action": "dataFileRemoveDuplicates:", "hidden": true},
{"path": "Edit > Data", "separator": true},
{"path": "Edit > Data > Column Statistics…", "action": "dataFileShowStatistics:"},
{"path": "Edit > Data > Search All Columns", "action": "dataFileSearchAllColumns:"},
{"path": "Edit > Data > Column Statistics…", "action": "dataFileShowStatistics:", "hidden": true},
{"path": "Edit > Data > Search All Columns", "action": "dataFileSearchAllColumns:", "hidden": true},
{"path": "Edit > Data", "separator": true},
{"path": "Edit > Data > Switch First Row Between Header and Data", "identifier": "shortcut.toggleHeaderRow", "action": "dataFileToggleHeaderRow:", "key": "h", "modifiers": ["shift", "command"]},
{"path": "Edit > Data > File Properties…", "action": "dataFileShowProperties:"},
{"path": "Edit > Data > Import into Table…", "action": "dataFileImportIntoTable:"},
{"path": "Edit > Data > Switch First Row Between Header and Data", "identifier": "shortcut.toggleHeaderRow", "action": "dataFileToggleHeaderRow:", "key": "h", "modifiers": ["shift", "command"], "hidden": true},
{"path": "Edit > Data > File Properties…", "action": "dataFileShowProperties:", "hidden": true},
{"path": "Edit > Data > Import into Table…", "action": "dataFileImportIntoTable:", "hidden": true},
{"path": "View"},
{"path": "View > Show Sidebar", "identifier": "shortcut.toggleTableBrowser", "action": "toggleSidebar:", "key": "0", "modifiers": ["command"]},
{"path": "View > Show Inspector", "identifier": "shortcut.toggleInspector", "action": "toggleInspector:", "key": "i", "modifiers": ["option", "command"]},
Expand Down Expand Up @@ -347,7 +346,6 @@
"com.TablePro.toolbar.results",
"com.TablePro.toolbar.export",
"com.TablePro.toolbar.import",
"com.TablePro.toolbar.dashboard",
"com.TablePro.toolbar.history",
"com.TablePro.toolbar.addRow",
"com.TablePro.toolbar.restorePreviousValues",
Expand Down
15 changes: 2 additions & 13 deletions TableProTests/Core/Menu/ChromeSnapshotTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,9 @@ private enum ChromeSnapshot {
"""
}

// MainMenuBuilder.build assigns NSApp's Services, Window and Help menus. The app's own are put
// back so the test host keeps the menu bar it launched with.
private static func menuBarEntries() -> [String] {
let app = NSApplication.shared
let services = app.servicesMenu
let windows = app.windowsMenu
let help = app.helpMenu
defer {
app.servicesMenu = services
app.windowsMenu = windows
app.helpMenu = help
}
let menu = MainMenuBuilder.build(keyboard: KeyboardSettings())
return entries(in: menu, path: [], appKitOwned: app.servicesMenu)
let built = MainMenuBuilder.build(keyboard: KeyboardSettings())
return entries(in: built.bar, path: [], appKitOwned: built.servicesMenu)
}

// AppKit fills the Services menu and appends open windows to the Window menu, so neither is
Expand Down
Loading