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.
This commit is contained in:
Fini 2026-07-04 18:07:10 +08:00
parent 3f6f9d157d
commit ea3a759e39

View file

@ -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);