From ea3a759e394ffa481eb90033a43d34c053c2360e Mon Sep 17 00:00:00 2001 From: Fini Date: Sat, 4 Jul 2026 18:07:10 +0800 Subject: [PATCH] test(orchestrator): update the stale unresolved-ref button test The accent-token contrast fix intentionally makes $color-accent buttons flip children to white instead of skipping; retarget the skip-on-unresolvable test at a genuinely non-accent token so it still guards that path. --- crates/op-orchestrator/src/role_post_pass_tests.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/op-orchestrator/src/role_post_pass_tests.rs b/crates/op-orchestrator/src/role_post_pass_tests.rs index 04a258a60..313ca2379 100644 --- a/crates/op-orchestrator/src/role_post_pass_tests.rs +++ b/crates/op-orchestrator/src/role_post_pass_tests.rs @@ -102,10 +102,13 @@ fn button_transparent_fill_skipped() { } #[test] -fn button_unresolved_ref_bg_skipped() { - // $color-accent doesn't resolve to a hex in the Rust context → skip. +fn button_unresolved_non_accent_ref_bg_skipped() { + // A non-accent design token can't resolve to a hex here AND isn't a known + // saturated-accent family, so the pass can't pick a safe fg → skip. (An + // accent token like $color-accent now DOES flip children to white — see + // `accent_token_button_flips_dark_icon_to_white`.) let mut btn = json!({ - "type":"frame","role":"button","fill":[{"type":"solid","color":"$color-accent"}], + "type":"frame","role":"button","fill":[{"type":"solid","color":"$color-surface-raised"}], "children":[{"type":"text","id":"t","content":"Go"}] }); fix_button_foreground_contrast(&mut btn);