From 3048ac9195eaedbedcc8aea060190d4471f4f7a2 Mon Sep 17 00:00:00 2001 From: Matysh Date: Sat, 3 Oct 2026 11:15:38 +0300 Subject: [PATCH] test(led): wait for the no-Glow fade to finish (#784) The state and room-setting updates are separate renders. Assert the stable no-Glow contract after the legitimate 500 ms leaving phase instead of racing it on fast CI runners. Release: v1.79.0-beta.4 Issue: #784 User-Visible: no --- demo/smoke_led_strip_glow.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/demo/smoke_led_strip_glow.mjs b/demo/smoke_led_strip_glow.mjs index ec1b1335..3db12187 100644 --- a/demo/smoke_led_strip_glow.mjs +++ b/demo/smoke_led_strip_glow.mjs @@ -184,6 +184,11 @@ check('unavailable: dashed, no field', JSON.stringify([unavailable?.state, !!una await setState('light.ceiling', 'on', { rgb_color: [128, 213, 255] }); await setStrips(await evaluate(() => window.__card._serverCfg.spaces[0].led_strips), { glow_enabled: false }); await settle(); +// The state update and the room setting update are deliberately separate. On +// a fast runner the first render can start the entering transition before the +// second one turns Glow off, so let that legitimate 500 ms leaving phase +// finish before asserting the stable no-Glow contract. +await page.waitForFunction(() => !window.__card.shadowRoot.querySelector('[data-led-field]')); const colored = await stripe('d_light1'); check('on without Glow: coloured core, no field', JSON.stringify([colored?.state, colored?.core !== '#FFFFFF', await field()]), JSON.stringify(['on', true, 0]));