44 references to PanelActionKind
Aspire.Tray.Tests (44)
src\Aspire.Tray\Common\TrayPanel.cs (17)
231/// missing on Start. Confirming returns <see cref="PanelActionKind.RemoveRecent"/>. 420return new(false, new PanelAction(PanelActionKind.Close)); 652return new(PanelActionKind.OpenDashboard, host, target.Bounds) { Recent = recent }; 657return new(PanelActionKind.Stop, host, target.Bounds) { Recent = recent }; 659return new(PanelActionKind.Start, host, target.Bounds) { Recent = recent }; 668return new(PanelActionKind.OpenIn, host, target.Bounds) 675return new(PanelActionKind.ShowInFolder, host, target.Bounds) { Recent = recent }; 678return new(PanelActionKind.CopyPath, host, target.Bounds) { Recent = recent }; 681return new(PanelActionKind.TogglePin, host, target.Bounds) { Recent = recent }; 684return new(PanelActionKind.RemoveRecent, host, target.Bounds) { Recent = true }; 688return new(PanelActionKind.ToggleRecent, Anchor: target.Bounds); 700PanelConfirmKind.ClearRecent => new(PanelActionKind.ClearRecent, Anchor: target.Bounds), 701_ => new(PanelActionKind.RemoveRecent, host, target.Bounds) { Recent = true } 708return new(PanelActionKind.SetLaunchAtSignIn, Anchor: target.Bounds) { Enabled = _settings?.Startup?.Enabled != true }; 710return new(PanelActionKind.Documentation, Anchor: target.Bounds); 712return new(PanelActionKind.Settings, Anchor: target.Bounds); 714return new(PanelActionKind.Quit, Anchor: target.Bounds);
src\Aspire.Tray\Common\TrayPanelScene.cs (2)
271internal sealed record PanelAction(PanelActionKind Kind, AppHostMenuItem? Host = null, PanelRect Anchor = default) 279/// <summary>For <see cref="PanelActionKind.OpenIn"/>: the title of the application to open the folder in.</summary>
TrayPanelTests.cs (25)
149Assert.Equal(PanelActionKind.ToggleRecent, response.Action?.Kind); 230Assert.Equal(new PanelAction(PanelActionKind.OpenIn, host, default) { Application = "Terminal" }, 232Assert.Equal(PanelActionKind.ShowInFolder, Pick(PanelTargetKind.ShowInFolder)?.Kind); 233Assert.Equal(PanelActionKind.CopyPath, Pick(PanelTargetKind.CopyPath)?.Kind); 235Assert.Equal(PanelActionKind.TogglePin, pin?.Kind); 257Assert.Equal(new PanelAction(PanelActionKind.RemoveRecent, recent, remove.Bounds) { Recent = true }, action); 277Assert.Equal(PanelActionKind.Stop, stop.Action?.Kind); 308Assert.Equal(PanelActionKind.Close, panel.Key(PanelKey.Escape).Action?.Kind); 393Assert.Equal(PanelActionKind.Stop, Click(panel, Target(panel, PanelTargetKind.Stop, state.AppHosts[0]).HitBounds).Action?.Kind); 394Assert.Equal(PanelActionKind.OpenDashboard, Click(panel, Target(panel, PanelTargetKind.Dashboard, state.AppHosts[0]).HitBounds).Action?.Kind); 396Assert.Equal(PanelActionKind.Start, start?.Kind); 398Assert.Equal(PanelActionKind.Settings, Click(panel, panel.Scene.Targets.Single(t => t.Kind == PanelTargetKind.Settings).HitBounds).Action?.Kind); 399Assert.Equal(PanelActionKind.Quit, Click(panel, panel.Scene.Targets.Single(t => t.Kind == PanelTargetKind.Quit).HitBounds).Action?.Kind); 400Assert.Equal(PanelActionKind.Documentation, Click(panel, panel.Scene.Targets.Single(t => t.Kind == PanelTargetKind.Documentation).HitBounds).Action?.Kind); 440Assert.Equal(PanelActionKind.Stop, response.Action?.Kind); 545Assert.Equal(PanelActionKind.Close, panel.Key(PanelKey.Escape).Action?.Kind); 557Assert.Equal(new PanelAction(PanelActionKind.Stop, state.AppHosts[1], Target(panel, PanelTargetKind.Stop, state.AppHosts[1]).Bounds), action); 586Assert.Equal(PanelActionKind.Close, panel.Key(PanelKey.Escape).Action?.Kind); 610Assert.Equal(PanelActionKind.Documentation, action?.Kind); 642Assert.Equal(PanelActionKind.ClearRecent, Click(panel, accept.HitBounds).Action?.Kind); 659Assert.Equal(PanelActionKind.RemoveRecent, action?.Kind); 668Assert.Equal(PanelActionKind.Settings, Click(panel, panel.Scene.Targets.Single(t => t.Kind == PanelTargetKind.Settings).HitBounds).Action?.Kind); 681Assert.Equal(PanelActionKind.SetLaunchAtSignIn, setLaunch?.Kind); 1248Assert.Equal(PanelActionKind.ClearRecent, clear?.Kind); 1335Assert.Equal(PanelActionKind.Quit, panel.Invoke(quit.Target.Key).Action?.Kind);