| ... | @@ -564,23 +564,26 @@ fn a_version_copied_into_its_section_is_listed_and_found() { | ... | @@ -564,23 +564,26 @@ fn a_version_copied_into_its_section_is_listed_and_found() { |
| 564 | assert!(!search_results(&found).is_empty(), "{found}"); | 564 | assert!(!search_results(&found).is_empty(), "{found}"); |
| 565 | } | 565 | } |
| 566 | | 566 | |
| 567 | /// Rename on a section tab's menu opens the shut sidebar on a field that takes what is | 567 | /// Rename on a section tab's menu opens the field on the tab, as a double click there does, |
| 568 | /// typed over the old name at once. | 568 | /// which takes what is typed over the old name at once; the shut sidebar stays shut. |
| 569 | #[test] | 569 | #[test] |
| 570 | fn renaming_a_section_from_its_tab_types_into_the_sidebar_at_once() { | 570 | fn renaming_a_section_from_its_tab_types_into_the_tab_at_once() { |
| 571 | let scratch = Scratch::new("rename-shut-sidebar"); | 571 | let scratch = Scratch::new("rename-tab"); |
| 572 | let notebook = | 572 | let notebook = |
| 573 | Path::new(env!("CARGO_MANIFEST_DIR")).join("../../corpus/cross-container/candidate"); | 573 | Path::new(env!("CARGO_MANIFEST_DIR")).join("../../corpus/cross-container/candidate"); |
| 574 | let mut steps = vec!["move 110 53", "press right", "release right", "settle"]; | 574 | let mut steps = vec!["move 110 53", "press right", "release right", "settle"]; |
| 575 | steps.extend(["key Down", "key Enter", "settle"]); | 575 | steps.extend(["key Down", "key Enter", "settle"]); |
| 576 | steps.extend(["type Renamed", "accessibility typed"]); | 576 | steps.extend(["type Renamed", "accessibility typed"]); |
| 577 | let [typed] = replay(&scratch, Some(&notebook), &steps) | 577 | steps.extend(["key Enter", "settle", "accessibility renamed"]); |
| | 578 | let [typed, renamed] = replay(&scratch, Some(&notebook), &steps) |
| 578 | .try_into() | 579 | .try_into() |
| 579 | .unwrap(); | 580 | .unwrap(); |
| 580 | assert!( | 581 | assert!( |
| 581 | typed.contains(r#"TextInput "Name" = "Renamed" [focused]"#), | 582 | typed.contains(r#"TextInput "Name" = "Renamed" [focused]"#), |
| 582 | "{typed}" | 583 | "{typed}" |
| 583 | ); | 584 | ); |
| | 585 | assert!(notebooks(&typed).is_empty(), "the sidebar opened:\n{typed}"); |
| | 586 | assert!(renamed.contains(r#"Tab "Renamed""#), "{renamed}"); |
| 584 | } | 587 | } |
| 585 | | 588 | |
| 586 | /// Finding on the page leaves the query room beside the match count: a press just past | 589 | /// Finding on the page leaves the query room beside the match count: a press just past |