| 1 | |
| 2 | |
| 3 | |
| 4 | use super::*; |
| 5 | |
| 6 | |
| 7 | |
| 8 | #[test] |
| 9 | fn the_export_tab_showing_does_not_block_menus_or_keys() { |
| 10 | let cards = src_text("player/cards.rs"); |
| 11 | let at = cards.find("pub(crate) fn menu_allowed").unwrap(); |
| 12 | assert!(cards[at..at + 300].contains("!self.covers_room()"), "menus ask covers_room, not modal"); |
| 13 | let t = src_text("player/timeline_edit.rs"); |
| 14 | assert!(!t.contains("self.modal()"), "timeline gestures ask covers_room"); |
| 15 | for open in ["open_head_menu", "open_gap_menu", "open_bench_menu"] { |
| 16 | let t = src_text("player/timeline_edit.rs"); |
| 17 | assert!(t.contains(&format!("fn {open}")), "{open} exists"); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | #[test] |
| 22 | fn silence_opens_beside_the_other_sections() { |
| 23 | let cards = src_text("player/cards.rs"); |
| 24 | let at = cards.find("self.silence_open = Some((lane, idx));").unwrap(); |
| 25 | assert!(cards[..at].trim_end().ends_with("self.close_other_cards();")); |
| 26 | } |
| 27 | |
| 28 | #[test] |
| 29 | fn the_speed_caption_is_one_unwrapped_line_and_the_tile_plus_shows_on_hover() { |
| 30 | assert!(!src_text("ui/cards/speed.rs").contains("dark_help(tail_text")); |
| 31 | let dock = src_text("ui/dock_stance.rs"); |
| 32 | let at = dock.find("dock-tile-add-btn").unwrap(); |
| 33 | assert!(dock[at - 400..at].contains("group_hover")); |
| 34 | } |