voice glow: regression spec — 3-min mute auto-disconnect stops the priRd/.fa-ban path + returns to the available nudge, live — TDD
The auto-disconnect already drives this asynchronously (burger-btn `_muteAutoDisconnect`
→ VoiceRoom.leave → _teardown → _notify{inCall:false,muted:false} → voice-glow render),
and the `voiceroom:ready` subscribe fix guarantees voice-glow receives it without a
refresh. Lock the muted→not-in-call transition behind a VoiceGlowSpec case: drops
`voice-muted` (priRd + .fa-ban) + restores the channel-available `voice-glow` nudge,
no longer "live" (no pulse/eq). Jasmine green.
Code architected by Disco DeDisco <discodedisco@outlook.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -143,6 +143,23 @@ describe("VoiceGlow", () => {
|
|||||||
expect(hasMuted(burger)).toBe(false);
|
expect(hasMuted(burger)).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("auto-disconnect (muted→not-in-call) stops the priRd/.fa-ban path + returns to the available nudge", () => {
|
||||||
|
// The 3-min mute timeout leaves voice → the mesh notifies
|
||||||
|
// {inCall:false, muted:false}; the glow must drop the muted colour
|
||||||
|
// (priRd/.fa-ban) + fall back to the channel-available nudge, live —
|
||||||
|
// no refresh (user-spec 2026-05-30).
|
||||||
|
vg = bindVoiceGlow();
|
||||||
|
burger.classList.add("active"); // fan open → cues land on the voice btn
|
||||||
|
vg.setVoiceState({ inCall: true, peerCount: 0, muted: true });
|
||||||
|
expect(hasMuted(voice)).toBe(true);
|
||||||
|
vg.setVoiceState({ inCall: false, peerCount: 0, muted: false });
|
||||||
|
expect(hasMuted(voice)).toBe(false); // priRd/.fa-ban path stopped
|
||||||
|
expect(hasMuted(burger)).toBe(false);
|
||||||
|
expect(hasGlow(voice)).toBe(true); // back to the available nudge
|
||||||
|
expect(hasPulse(voice)).toBe(false); // not "live" anymore
|
||||||
|
expect(hasEq(voice)).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
it("hands the pulse to whichever surface is showing (fan toggles)", () => {
|
it("hands the pulse to whichever surface is showing (fan toggles)", () => {
|
||||||
vg = bindVoiceGlow();
|
vg = bindVoiceGlow();
|
||||||
vg.setVoiceState({ inCall: true, peerCount: 0 });
|
vg.setVoiceState({ inCall: true, peerCount: 0 });
|
||||||
|
|||||||
@@ -143,6 +143,23 @@ describe("VoiceGlow", () => {
|
|||||||
expect(hasMuted(burger)).toBe(false);
|
expect(hasMuted(burger)).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("auto-disconnect (muted→not-in-call) stops the priRd/.fa-ban path + returns to the available nudge", () => {
|
||||||
|
// The 3-min mute timeout leaves voice → the mesh notifies
|
||||||
|
// {inCall:false, muted:false}; the glow must drop the muted colour
|
||||||
|
// (priRd/.fa-ban) + fall back to the channel-available nudge, live —
|
||||||
|
// no refresh (user-spec 2026-05-30).
|
||||||
|
vg = bindVoiceGlow();
|
||||||
|
burger.classList.add("active"); // fan open → cues land on the voice btn
|
||||||
|
vg.setVoiceState({ inCall: true, peerCount: 0, muted: true });
|
||||||
|
expect(hasMuted(voice)).toBe(true);
|
||||||
|
vg.setVoiceState({ inCall: false, peerCount: 0, muted: false });
|
||||||
|
expect(hasMuted(voice)).toBe(false); // priRd/.fa-ban path stopped
|
||||||
|
expect(hasMuted(burger)).toBe(false);
|
||||||
|
expect(hasGlow(voice)).toBe(true); // back to the available nudge
|
||||||
|
expect(hasPulse(voice)).toBe(false); // not "live" anymore
|
||||||
|
expect(hasEq(voice)).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
it("hands the pulse to whichever surface is showing (fan toggles)", () => {
|
it("hands the pulse to whichever surface is showing (fan toggles)", () => {
|
||||||
vg = bindVoiceGlow();
|
vg = bindVoiceGlow();
|
||||||
vg.setVoiceState({ inCall: true, peerCount: 0 });
|
vg.setVoiceState({ inCall: true, peerCount: 0 });
|
||||||
|
|||||||
Reference in New Issue
Block a user