95 references to TrayPanelSamples
Aspire.Tray.Tests (95)
LinuxTrayTests.cs (8)
44"Typical" => TrayPanelSamples.Typical(), 45"Empty" => TrayPanelSamples.Empty() with { RecentAppHosts = [], CanClearRecent = false }, 46"RecentOnly" => TrayPanelSamples.Empty(), 47"Disconnected" => TrayPanelSamples.Disconnected(), 48"Errors" => TrayPanelSamples.Errors(), 75var offline = TrayPanelSamples.Offline(Path.GetFullPath("Offline.AppHost/apphost.cs")); 76var running = TrayPanelSamples.Running(Path.GetFullPath("Running.AppHost/apphost.cs"), 42) with { IsPinned = true }; 553var state = TrayPanelSamples.Typical();
TrayIconStatusTests.cs (7)
13Assert.Equal(TrayIconStatus.Idle, TrayIconStatusRules.Get(TrayPanelSamples.Empty())); 22[TrayPanelSamples.Running("/src/A/A.AppHost.csproj", 1), TrayPanelSamples.Running("/src/B/B.AppHost.csproj", 2, AppHostHealth.Unknown)], ""); 33var state = new TrayViewState(DiscoveryState.Live, [TrayPanelSamples.Running("/src/A/A.AppHost.csproj", 1, (AppHostHealth)health)], ""); 41var running = TrayPanelSamples.Running("/src/A/A.AppHost.csproj", 1); 54var state = new TrayViewState(DiscoveryState.Live, [TrayPanelSamples.Offline("/src/A/A.cs", starting: true)], ""); 66var state = new TrayViewState((DiscoveryState)discovery, [TrayPanelSamples.Running("/src/A/A.AppHost.csproj", 1)], "");
TrayPanelTests.cs (80)
23"typical" => TrayPanelSamples.Typical(), 24"empty" => TrayPanelSamples.Empty(), 25"connecting" => TrayPanelSamples.Connecting(), 26"errors" => TrayPanelSamples.Errors(), 27"disconnected" => TrayPanelSamples.Disconnected(), 28"many" => TrayPanelSamples.Many(), 29_ => TrayPanelSamples.Typical() 92var state = TrayPanelSamples.Many(); 132var state = TrayPanelSamples.Typical(); 171var scene = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light).Scene; 183var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 197var panel = new TrayPanel(TrayPanelSamples.Empty(), TrayPanelPalette.Light); 207var state = TrayPanelSamples.Typical(); 225var state = TrayPanelSamples.Typical(); 253var state = TrayPanelSamples.Typical(); 284var state = TrayPanelSamples.Typical(); 304var state = TrayPanelSamples.Typical(); 324var state = TrayPanelSamples.Typical(); 354var state = TrayPanelSamples.Typical(); 381var state = TrayPanelSamples.Typical(); 391var state = TrayPanelSamples.Typical(); 404var state = TrayPanelSamples.Many(); 418var state = TrayPanelSamples.Typical(); 430var state = TrayPanelSamples.Typical(); 446var state = TrayPanelSamples.Typical(); 457var state = TrayPanelSamples.Typical(); 471var state = TrayPanelSamples.Typical(); 476Assert.False(panel.Update(TrayPanelSamples.Empty())); 488var state = TrayPanelSamples.Typical(); 506var panel = new TrayPanel(TrayPanelSamples.Many(), TrayPanelPalette.Light) { MaxHeight = 480 }; 528var panel = new TrayPanel(TrayPanelSamples.Many(), TrayPanelPalette.Light) { MaxHeight = 480 }; 542var panel = new TrayPanel(TrayPanelSamples.Many(count: 8), TrayPanelPalette.Light) { MaxHeight = 568 }; 557var panel = new TrayPanel(TrayPanelSamples.Many(), TrayPanelPalette.Light) { MaxHeight = 480 }; 574var state = TrayPanelSamples.Many(); 580var next = TrayPanelSamples.Empty(); 592var state = TrayPanelSamples.Many(); 605var state = TrayPanelSamples.Many(); 626var state = TrayPanelSamples.Typical(); 647var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 656var state = TrayPanelSamples.Typical(); 669var state = TrayPanelSamples.Errors(); 682var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 696var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 709var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 721var state = TrayPanelSamples.Typical(); 734var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 753var state = TrayPanelSamples.Typical(); 771var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 798var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 811var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 824var panel = new TrayPanel(TrayPanelSamples.Many(), TrayPanelPalette.Light) { MaxHeight = 400 }; 845var state = TrayPanelSamples.Typical(); 876var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 880panel.Update(TrayPanelSamples.Connecting()); 889var panel = new TrayPanel(TrayPanelSamples.Many(), TrayPanelPalette.Light) { MaxHeight = 400 }; 914Assert.Equal("3 running · 1 needs attention", TrayPanel.GetHeaderStatus(TrayPanelSamples.Typical(), TrayPanelPalette.Light).Text); 915Assert.Equal("No AppHosts running", TrayPanel.GetHeaderStatus(TrayPanelSamples.Empty(), TrayPanelPalette.Light).Text); 917TrayPanel.GetHeaderStatus(TrayPanelSamples.Errors(), TrayPanelPalette.Light).Text); 923var host = TrayPanelSamples.Running("/Users/dev/src/eShop/src/eShop.AppHost/eShop.AppHost.csproj", 48213, AppHostHealth.Warning); 934var scene = new TrayPanel(TrayPanelSamples.Errors(), TrayPanelPalette.Light).Scene; 949var host = TrayPanelSamples.Running("/src/A/A.AppHost.csproj", 1, (AppHostHealth)health, stopping: stopping, error: error ? "Failed." : null); 957Assert.Equal(PanelStatusGlyph.Stopped, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs"), live: true)); 958Assert.Equal(PanelStatusGlyph.Busy, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs", starting: true), live: true)); 959Assert.Equal(PanelStatusGlyph.Warning, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs", error: "No."), live: true)); 1046var scene = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light).Scene; 1102var state = TrayPanelSamples.Typical(); 1116var withNotice = new TrayPanel(TrayPanelSamples.Errors(), TrayPanelPalette.Light); 1117var without = new TrayPanel(TrayPanelSamples.Errors() with { Notice = null }, TrayPanelPalette.Light); 1131var state = TrayPanelSamples.Errors() with 1258var state = TrayPanelSamples.Typical(); 1366var scene = new TrayPanel(TrayPanelSamples.Errors(), palette).Scene; 1444var state = TrayPanelSamples.Typical(); 1462var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 1480var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 1495var state = TrayPanelSamples.Typical(); 1508var panel = new TrayPanel(TrayPanelSamples.Many(), TrayPanelPalette.Light) { MaxHeight = 400 }; 1527var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 1543var state = TrayPanelSamples.Typical(); 1567var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 1579var scene = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light).Scene;