Files
LlamaCasty/ytLive.Tests/AudioDockLayoutTests.cs
T
gramps a7d1afc70b fix(dock): spans the preview column and loses 20px
- The dock now sits in the preview column (Grid.Column=1), so its left edge is the layers panel's
  right edge instead of starting under the brand column. It is a preview-column control, not a
  full-width footer.
- Expanded height 168 → 148 (112 bays + 36 master strip): the mockup's number read as wasted space
  beneath the 154px scene strip.

Guard: AudioDockLayoutTests pins 148 as the design number, so the constant cannot drift silently.
2026-10-30 12:39:36 -07: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(148, AudioDockLayout.ExpandedHeight); // 112 bays + 36 strip
Assert.Equal(36, AudioDockLayout.CollapsedHeight);
}
}