mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-27 17:27:51 +00:00
File > Automate: Crop and Straighten Photos and Contact Sheet II each get their own separator group (#13704)
Adds a separator after Crop and Straighten Photos and after Contact Sheet II, and removes the one between Lens Correction and Merge to HDR Pro, matching the measured reference order. Ids and order are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
0b15ad2401
commit
e3a13a41e1
@@ -809,6 +809,8 @@ mod cam_no_pixels_alert_tests;
|
||||
#[cfg(test)]
|
||||
mod eyedropper_context_menu_tests;
|
||||
#[cfg(test)]
|
||||
mod menu_automate_groups_tests;
|
||||
#[cfg(test)]
|
||||
mod patch_shift_constrain_tests;
|
||||
#[cfg(test)]
|
||||
mod pencil_pressure_toggles_tests;
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
//! File > Automate groups its rows with separators as the reference application does (#13704).
|
||||
|
||||
use crate::menu_catalog::CATALOG;
|
||||
|
||||
#[test]
|
||||
fn automate_rows_fall_into_the_measured_separator_groups() {
|
||||
let mut groups: Vec<Vec<&str>> = vec![Vec::new()];
|
||||
for row in CATALOG.iter().filter(|r| r.0 == ["File", "Automate"]) {
|
||||
if row.3 == "---" {
|
||||
groups.push(Vec::new());
|
||||
} else if let Some(last) = groups.last_mut() {
|
||||
last.push(row.3.trim_start_matches("file.automate."));
|
||||
}
|
||||
}
|
||||
let expected: Vec<Vec<&str>> = vec![
|
||||
vec!["batch", "createDroplet"],
|
||||
vec!["cropAndStraightenPhotos"],
|
||||
vec!["contactSheetII"],
|
||||
vec!["conditionalModeChange", "fitImage", "lensCorrection", "mergeToHdrPro", "photomerge"],
|
||||
];
|
||||
assert_eq!(groups, expected);
|
||||
}
|
||||
@@ -45,11 +45,12 @@ pub static CATALOG: &[(&[&str], &str, Option<&str>, &str)] = &[
|
||||
(&["File", "Automate"], "Create Droplet…", None, "file.automate.createDroplet"),
|
||||
(&["File", "Automate"], "---", None, "---"),
|
||||
(&["File", "Automate"], "Crop and Straighten Photos", None, "file.automate.cropAndStraightenPhotos"),
|
||||
(&["File", "Automate"], "---", None, "---"),
|
||||
(&["File", "Automate"], "Contact Sheet II…", None, "file.automate.contactSheetII"),
|
||||
(&["File", "Automate"], "---", None, "---"),
|
||||
(&["File", "Automate"], "Conditional Mode Change…", None, "file.automate.conditionalModeChange"),
|
||||
(&["File", "Automate"], "Fit Image…", None, "file.automate.fitImage"),
|
||||
(&["File", "Automate"], "Lens Correction…", None, "file.automate.lensCorrection"),
|
||||
(&["File", "Automate"], "---", None, "---"),
|
||||
(&["File", "Automate"], "Merge to HDR Pro…", None, "file.automate.mergeToHdrPro"),
|
||||
(&["File", "Automate"], "Photomerge…", None, "file.automate.photomerge"),
|
||||
(&["File", "Scripts"], "Image Processor…", None, "file.scripts.imageProcessor"),
|
||||
|
||||
Reference in New Issue
Block a user