ElyMark: R4.9 round 2 fixes, component pin 6c2d28c
Delete Table in an open block leaves focus on the document; Windows-only import gated; menu tests run on Windows and Linux only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f84f990f90
commit
09fcb0b3ed
8 files changed
+31
-8
No files matched your search
@@ -230,7 +230,8 @@ impl Desk {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
// macOS menus are the system's, not drawn.
|
||||
#[cfg(all(test, not(target_os = "macos")))]
|
||||
mod menus;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
@@ -76,3 +76,15 @@ fn delete_table_from_the_menu_is_one_undo_step(cx: &mut TestAppContext) {
|
||||
press("secondary-z", cx);
|
||||
assert_eq!(current(&desk, cx), TABLED);
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
fn delete_table_in_an_open_block_keeps_keyboard_undo(cx: &mut TestAppContext) {
|
||||
let (desk, cx, _files) = opened(TABLED, cx);
|
||||
let bounds = cx.debug_bounds("markdown-block-1").expect("the table");
|
||||
let at = point(bounds.left() + px(4.), bounds.top() + px(4.));
|
||||
cx.simulate_click(at, Modifiers::none());
|
||||
choose(crate::tools::table_menu, 13, cx);
|
||||
assert_eq!(current(&desk, cx), "before\n\nafter\n");
|
||||
press("secondary-z", cx);
|
||||
assert_eq!(current(&desk, cx), TABLED);
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
use ely_gpui_component::documents::MarkdownDocument;
|
||||
#[cfg(target_os = "windows")]
|
||||
use gpui::Action;
|
||||
use gpui::{
|
||||
Action, ClipboardItem, Entity, Focusable as _, Menu, MenuItem, TestAppContext,
|
||||
VisualTestContext,
|
||||
ClipboardItem, Entity, Focusable as _, Menu, MenuItem, TestAppContext, VisualTestContext,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
|
||||
Reference in new issue
Block a user