mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-30 02:07:10 +01:00
Tests: Cutout and Objects on Path clicks wait for the CJK font lookup
The Japanese pass of gallery_cutout_setting_uses_its_localized_label and compact_objects_on_path_options_pivot_rotate_reset_and_save measures controls in one frame and clicks the saved positions in later frames. When the CJK font lookup finishes in between, the labels change width and the click can miss. Both tests now call wait_for_cjk_fonts() before measuring, as #9898 did for the Effect Gallery and Hyphenation tests.
This commit is contained in:
1 parent
378ab8525e
commit
bca6e772f5
2 files changed
+4
No files matched your search
@@ -313,6 +313,8 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn gallery_cutout_setting_uses_its_localized_label() {
|
||||
// The Japanese pass measures Cutout in one frame and clicks it in a later one.
|
||||
crate::testing::wait_for_cjk_fonts();
|
||||
let viewport = Rect::from_min_size(Pos2::ZERO, vec2(800.0, 500.0));
|
||||
let mut shown_labels = Vec::new();
|
||||
for (language, expected) in [("en", "Levels"), ("de", "Stufen"), ("ja", "レベル数")] {
|
||||
|
||||
@@ -77,6 +77,8 @@ fn compact_objects_on_path_options_pivot_rotate_reset_and_save() {
|
||||
}
|
||||
|
||||
const PIVOT_NAMES: [&str; 9] = ["Top Left", "Top", "Top Right", "Left", "Center", "Right", "Bottom Left", "Bottom", "Bottom Right"];
|
||||
// The Japanese pass measures the controls once and clicks them frames later.
|
||||
crate::testing::wait_for_cjk_fonts();
|
||||
let screen = Rect::from_min_size(Pos2::ZERO, vec2(800.0, 500.0));
|
||||
let mut untranslated = Vec::new();
|
||||
for lang in ["en", "de", "fr", "ja"] {
|
||||
|
||||
Reference in new issue
Block a user