Compare commits

...

1 Commits

Author SHA1 Message Date
denny
291853c32e #2687 HistoryTableViewTest uses the platform copy shortcut so it passes on macOS
HistoryTableView matches SHORTCUT_DOWN+C, which JavaFX maps to Cmd-C on macOS. The test always fired Ctrl-C, so the copy never triggered on the macOS CI runner and the clipboard assertion failed. The test now fires Meta-C on macOS and Ctrl-C elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 03:04:15 -05:00

View File

@@ -76,9 +76,11 @@ public class HistoryTableViewTest
table.getSelectionModel().select(0);
table.getSelectionModel().select(2);
//The copy shortcut is Cmd-C (meta) on macOS and Ctrl-C elsewhere
boolean mac = System.getProperty("os.name", "").toLowerCase().startsWith("mac");
Clipboard.getSystemClipboard().clear();
Event.fireEvent(table, new KeyEvent(KeyEvent.KEY_PRESSED, "", "", KeyCode.C, false,
true, false, false));
!mac, false, mac));
copied.complete(Clipboard.getSystemClipboard().getString());
}
catch(Throwable t)