Files
LlamaCasty/ytLive.Tests/AudioDockLayoutTests.cs
T
gramps f8e4f2cf29 ui(audio): master meter centred and biggest; TRAX gets its own bay and meter
Creator rulings, 2026-11-01.

- Master strip is 44px (from 36) and its meter is now the largest on screen: 420x14 with 32
  segments, centred under the preview, with a 12px MASTER label — bigger than the 9px bay
  labels. L/R imbalance is a flag on the left, MONO and the session clock on the right.
- The kbps / fps / dropped counters are gone from that line: the live readouts already sit
  above the preview, and the duplicate was noise rather than telemetry.
- TRAX is its own bay (MIC | GAME | TRAX | LIP-SYNC) with its own meter bound to
  TraxMeterFraction. It lived inside the game bay with no ladder, which meant whether the bed
  was actually playing could not be answered from the dock — and the player already measures
  its own output.
- Lip-sync is narrow (0.45 star) since it is one slider and three presets; the three sound bays
  are equal width, so their meters keep the same relative size.

AudioDockLayout moves with it (156 = 112 + 44; collapsed 44) and the layout test is updated.
TraxBayTests now asserts the opposite of the old ruling: the bay HAS a meter, and the game bay
no longer carries it.
2026-11-01 13:48:28 -08:00

33 lines
1.4 KiB
C#

using Xunit;
using ytLive.Models;
namespace ytLive.Tests;
/// <summary>The dock's height is the whole reason it is allowed to take 168px: on a short window it
/// must get out of the way instead of squeezing the preview. The threshold is the creator's
/// minimum (768) and default (1040) — both sides are pinned here so a future "tidy" cannot leave a
/// 768px window with a full dock.
/// </summary>
public class AudioDockLayoutTests
{
[Fact]
public void The_dock_collapses_on_short_windows_and_expands_on_normal_ones()
{
// Minimum window: collapsed, so the preview keeps its room.
Assert.True(AudioDockLayout.IsCollapsed(768));
Assert.Equal(AudioDockLayout.CollapsedHeight, AudioDockLayout.HeightFor(768));
// Default window: the full dock.
Assert.False(AudioDockLayout.IsCollapsed(1040));
Assert.Equal(AudioDockLayout.ExpandedHeight, AudioDockLayout.HeightFor(1040));
// The boundary itself belongs to the expanded side (>= is the friendlier read).
Assert.False(AudioDockLayout.IsCollapsed(AudioDockLayout.CollapseBelowHeight));
Assert.True(AudioDockLayout.IsCollapsed(AudioDockLayout.CollapseBelowHeight - 1));
// The two heights are the design's numbers, not whatever looked fine.
Assert.Equal(156, AudioDockLayout.ExpandedHeight); // 112 bays + 44 master strip
Assert.Equal(44, AudioDockLayout.CollapsedHeight);
}
}