From bc2a70ac5f0adc7ae4422567df0f9a4d2d73e6a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E6=A0=96=E7=9F=A5?= <2298888111@qq.com> Date: Sun, 25 Oct 2026 02:13:53 +0800 Subject: [PATCH] test(HEL-845): wait for settled before and after colors Co-authored-by: multica-agent --- scripts/hel845/verify.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/hel845/verify.py b/scripts/hel845/verify.py index 0a13b93d..625987c4 100644 --- a/scripts/hel845/verify.py +++ b/scripts/hel845/verify.py @@ -171,12 +171,22 @@ try: old = page.add_style_tag( content='[data-theme="day"] .lib2 {--lib-option-bg:var(--hi);--lib-option-shadow:0 1px 2px rgb(var(--ink) / .14),0 0 0 1px rgb(var(--ink) / .06)}' ) + page.wait_for_timeout(300) before = page.locator( ".lib-segment button.on" ).evaluate_all(metrics_js) old.evaluate("n=>n.remove()") + page.wait_for_timeout(300) if theme != "day": assert before == actual + else: + assert before[0]["background"] == "rgb(20, 17, 9)" + assert ( + contrast( + before[0]["background"], before[0]["color"] + ) + < 1.2 + ) assert not page.evaluate( "document.documentElement.scrollWidth > innerWidth" )