mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-05 21:42:59 -05:00
Merge pull request #10371 from dotCooCoo/fix/census-tests-representative
Tests: Color Effects history names check two adjustments in two languages
This commit is contained in:
1 file changed
+6
-3
@@ -64,10 +64,13 @@ fn every_adjustment_offered_is_a_colour_adjustment_with_its_defaults() {
|
||||
}
|
||||
|
||||
/// Apply as Filter records a step that History and Edit › Undo name as the panel names the
|
||||
/// adjustment, in every language (German's plain `Levels` row and its Effect menu row differ).
|
||||
/// adjustment: Levels, which has fields, and Desaturate, which has none, in English and German
|
||||
/// (German's plain `Levels` row and its Effect menu row differ).
|
||||
#[test]
|
||||
fn history_names_a_filter_step_as_the_panel_names_its_adjustment() {
|
||||
for (i, (id, _, fields)) in ADJUSTMENTS.iter().enumerate() {
|
||||
let pick = |want: &str| ADJUSTMENTS.iter().position(|a| a.0 == want).expect("an adjustment");
|
||||
for i in [pick("adjust.levels"), pick("addon.color.desaturate")] {
|
||||
let (id, _, fields) = &ADJUSTMENTS[i];
|
||||
let mut app = app();
|
||||
app.run("paint.setFill", json!({"color": "#806040"})).unwrap();
|
||||
let (_, mut params) = Picked { index: i, ..Picked::default() }.params();
|
||||
@@ -82,7 +85,7 @@ fn history_names_a_filter_step_as_the_panel_names_its_adjustment() {
|
||||
let shown = std::rc::Rc::clone(&app);
|
||||
let mut fixture = craft::ui::testing::Fixture::new(move |ui| super::show(&mut shown.borrow_mut(), ui));
|
||||
fixture.room(egui::vec2(320.0, 700.0));
|
||||
for lang in crate::i18n::Lang::all() {
|
||||
for lang in [crate::i18n::Lang::EN, crate::i18n::Lang::from_code("de").expect("German")] {
|
||||
crate::i18n::set_current(lang);
|
||||
let step = crate::panels::history::shown(&h);
|
||||
fixture.settle();
|
||||
|
||||
Reference in new issue
Block a user