using Xunit; using ytLive.Models; namespace ytLive.Tests; /// 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. /// 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(168, AudioDockLayout.ExpandedHeight); Assert.Equal(36, AudioDockLayout.CollapsedHeight); } }