M14: distinguish qualification from publication (#4173)

This commit is contained in:
skylar taylor-barrick
2026-10-25 23:47:58 -04:00
committed by GitHub
parent 3ce284cda3
commit 581c79dcb1
27 changed files with 298 additions and 50 deletions
+2
View File
@@ -336,6 +336,8 @@ fn import(app: &mut VectorcraftApp, d: &mut Dialog) -> Result<(), String> {
Ok(())
}
/// Draw the graph-data sheet: keyboard cell movement, block paste, import, transpose, switch-x/y
/// and revert actions, decimals and column width, and only the cells in view.
fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
let entry_id = egui::Id::unique("graph-data-entry");
if ui.memory(|m| m.has_focus(entry_id)) {
@@ -30,6 +30,7 @@ pub(crate) fn hint(d: &Dialog) -> &'static str {
}
}
/// Temp-memory key for the revolve gizmo drag state.
fn drag_id() -> Id {
Id::unique("revolve-gizmo-drag")
}
@@ -373,6 +373,7 @@ struct Cache {
shots: Vec<(String, Result<Shot, String>)>,
}
/// Temp-memory key for the Save for Web preview render, original image and optimised shot textures.
fn cache_id() -> egui::Id {
egui::Id::unique("save-for-web-previews")
}
@@ -13,6 +13,7 @@ use crate::VectorcraftApp;
type Harness = egui_kittest::Harness<'static, VectorcraftApp>;
/// Build a 300 by 300 document for a real-dialog accessibility harness.
fn app() -> VectorcraftApp {
let mut app = VectorcraftApp::new(Session::new(), Default::default());
app.run("file.new", json!({"width": 300, "height": 300})).unwrap();
@@ -38,6 +39,7 @@ fn strict(app: VectorcraftApp) -> Harness {
h
}
/// Export for Screens names its three text fields and exposes no raw widget ids.
#[test]
fn export_for_screens_names_the_form_text_fields() {
let mut app = app();
@@ -50,6 +52,8 @@ fn export_for_screens_names_the_form_text_fields() {
assert!(h.query_by_role_and_label(Role::TextInput, "prefix").is_none(), "no internal widget id");
}
/// Flatten Transparency names its preset name and three resolution or balance fields and roles the
/// balance control as a slider.
#[test]
fn flatten_transparency_names_its_preset_and_option_fields() {
let mut app = app();
@@ -66,6 +70,7 @@ fn flatten_transparency_names_its_preset_and_option_fields() {
let _ = h.get_by_role_and_label(Role::Slider, "Raster/Vector Balance:");
}
/// Document Setup names the top, bottom, left and right bleed inputs.
#[test]
fn document_setup_names_each_bleed_side() {
let mut app = app();
@@ -76,6 +81,8 @@ fn document_setup_names_each_bleed_side() {
}
}
/// Split Into Grid keeps translated visible labels while naming row and column gutter and total
/// inputs by axis and context.
#[test]
fn split_into_grid_names_row_and_column_fields_with_context() {
let mut app = app();
@@ -93,6 +100,7 @@ fn split_into_grid_names_row_and_column_fields_with_context() {
assert_eq!(h.get_all_by_label("Total:").count(), 2, "the visible total labels are unchanged");
}
/// Artboard Options names the video ruler pixel aspect ratio input.
#[test]
fn artboard_options_names_the_video_pixel_aspect_ratio_field() {
let mut app = app();
@@ -103,6 +111,7 @@ fn artboard_options_names_the_video_pixel_aspect_ratio_field() {
let _ = h.get_by_role_and_label(Role::TextInput, "Video Ruler Pixel Aspect Ratio:");
}
/// A generic parameter dialog names its number and text inputs, combo boxes and checkbox.
#[test]
fn generic_parameter_dialog_names_numbers_text_and_choices() {
let mut app = app();
@@ -130,6 +139,7 @@ fn generic_parameter_dialog_names_numbers_text_and_choices() {
let _ = h.get_by_role_and_label(Role::CheckBox, "Flip:");
}
/// Slice Options names its multiline text-display area.
#[test]
fn slice_options_names_its_text_area() {
let mut app = app();
@@ -56,6 +56,7 @@ impl Harness {
self.texts.iter().find(|(s, _)| s == text).map(|(_, r)| *r).unwrap_or_else(|| panic!("missing text {text:?}"))
}
/// Return the rectangle of the widget drawn under `Id::unique(id)` in the revolve test harness.
fn response(&self, id: impl std::hash::Hash + std::fmt::Debug) -> Rect {
self.ctx.read_response(Id::unique(id)).unwrap().rect
}