87 references to TrayPanelSamples
Aspire.Tray.Tests (87)
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 (72)
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() 131var scene = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light).Scene; 143var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 157var panel = new TrayPanel(TrayPanelSamples.Empty(), TrayPanelPalette.Light); 167var state = TrayPanelSamples.Typical(); 185var state = TrayPanelSamples.Typical(); 213var state = TrayPanelSamples.Typical(); 244var state = TrayPanelSamples.Typical(); 264var state = TrayPanelSamples.Typical(); 284var state = TrayPanelSamples.Typical(); 314var state = TrayPanelSamples.Typical(); 341var state = TrayPanelSamples.Typical(); 351var state = TrayPanelSamples.Typical(); 364var state = TrayPanelSamples.Many(); 378var state = TrayPanelSamples.Typical(); 390var state = TrayPanelSamples.Typical(); 406var state = TrayPanelSamples.Typical(); 417var state = TrayPanelSamples.Typical(); 431var state = TrayPanelSamples.Typical(); 436Assert.False(panel.Update(TrayPanelSamples.Empty())); 448var state = TrayPanelSamples.Typical(); 466var panel = new TrayPanel(TrayPanelSamples.Many(), TrayPanelPalette.Light) { MaxHeight = 480 }; 488var state = TrayPanelSamples.Many(); 501var state = TrayPanelSamples.Many(); 522var state = TrayPanelSamples.Typical(); 543var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 552var state = TrayPanelSamples.Typical(); 565var state = TrayPanelSamples.Errors(); 578var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 592var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 605var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 617var state = TrayPanelSamples.Typical(); 630var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 649var state = TrayPanelSamples.Typical(); 667var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 694var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 707var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 720var panel = new TrayPanel(TrayPanelSamples.Many(), TrayPanelPalette.Light) { MaxHeight = 400 }; 741var state = TrayPanelSamples.Typical(); 772var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 776panel.Update(TrayPanelSamples.Connecting()); 785var panel = new TrayPanel(TrayPanelSamples.Many(), TrayPanelPalette.Light) { MaxHeight = 400 }; 810Assert.Equal("3 running · 1 needs attention", TrayPanel.GetHeaderStatus(TrayPanelSamples.Typical(), TrayPanelPalette.Light).Text); 811Assert.Equal("No AppHosts running", TrayPanel.GetHeaderStatus(TrayPanelSamples.Empty(), TrayPanelPalette.Light).Text); 813TrayPanel.GetHeaderStatus(TrayPanelSamples.Errors(), TrayPanelPalette.Light).Text); 819var host = TrayPanelSamples.Running("/Users/dev/src/eShop/src/eShop.AppHost/eShop.AppHost.csproj", 48213, AppHostHealth.Warning); 830var scene = new TrayPanel(TrayPanelSamples.Errors(), TrayPanelPalette.Light).Scene; 845var host = TrayPanelSamples.Running("/src/A/A.AppHost.csproj", 1, (AppHostHealth)health, stopping: stopping, error: error ? "Failed." : null); 853Assert.Equal(PanelStatusGlyph.Stopped, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs"), live: true)); 854Assert.Equal(PanelStatusGlyph.Busy, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs", starting: true), live: true)); 855Assert.Equal(PanelStatusGlyph.Warning, TrayPanel.GetStatusGlyph(TrayPanelSamples.Offline("/src/A/A.cs", error: "No."), live: true)); 942var scene = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light).Scene; 998var state = TrayPanelSamples.Typical(); 1012var withNotice = new TrayPanel(TrayPanelSamples.Errors(), TrayPanelPalette.Light); 1013var without = new TrayPanel(TrayPanelSamples.Errors() with { Notice = null }, TrayPanelPalette.Light); 1127var state = TrayPanelSamples.Typical(); 1235var scene = new TrayPanel(TrayPanelSamples.Errors(), palette).Scene; 1313var state = TrayPanelSamples.Typical(); 1331var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 1349var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 1364var state = TrayPanelSamples.Typical(); 1377var panel = new TrayPanel(TrayPanelSamples.Many(), TrayPanelPalette.Light) { MaxHeight = 400 }; 1396var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light); 1412var state = TrayPanelSamples.Typical(); 1438var panel = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light) { QuitVerb = verb }; 1450var scene = new TrayPanel(TrayPanelSamples.Typical(), TrayPanelPalette.Light).Scene;