mirror of
https://github.com/storytold/texturecraft.git
synced 2026-11-28 17:19:24 +01:00
Export: the greyed bit depth test uses a one-depth file type and finds the lists by value
BMP and JPEG list 8 bits and 8 bits + dithering, so their bit depth list is enabled; the greyed one is HDR's (32f bits only), whose rows clashed. The greyed lists expose their value, not a label, to the accessibility tree, so the test now counts two HDR rows' "32f bits" lists.
This commit is contained in:
1 parent
00238575c8
commit
982a17c10f
1 file changed
+3
-2
@@ -286,12 +286,13 @@ fn rows_with_a_one_depth_file_type_each_have_their_own_bit_depth_list() {
|
||||
let template = h.state().ui.export.preset.clone();
|
||||
let mut o = SetExport { maps_template: template, ..SetExport::default() };
|
||||
for map in &rows {
|
||||
o.maps.insert(*map, MapExport { enabled: true, file_type: Some(FileType { format: "bmp".into(), bit_depth: 8, dithering: false }), size: None });
|
||||
o.maps.insert(*map, MapExport { enabled: true, file_type: Some(FileType { format: "hdr".into(), bit_depth: 32, dithering: false }), size: None });
|
||||
}
|
||||
h.state_mut().ui.export.sets.insert(0, o);
|
||||
h.run_steps(4);
|
||||
|
||||
let greyed: Vec<_> = h.get_all_by_role_and_label(egui::Role::ComboBox, "Bit depth").map(|node| node.accesskit_node().id()).collect();
|
||||
let greyed: Vec<_> =
|
||||
h.get_all_by_role(egui::Role::ComboBox).filter(|node| node.value().as_deref() == Some("32f bits")).map(|node| node.accesskit_node().id()).collect();
|
||||
|
||||
assert_eq!(rows.len(), 2);
|
||||
assert_eq!(greyed.len(), 2, "each row's greyed bit depth list is its own node");
|
||||
|
||||
Reference in new issue
Block a user