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"/>.
420
return new(false, new PanelAction(
PanelActionKind
.Close));
652
return new(
PanelActionKind
.OpenDashboard, host, target.Bounds) { Recent = recent };
657
return new(
PanelActionKind
.Stop, host, target.Bounds) { Recent = recent };
659
return new(
PanelActionKind
.Start, host, target.Bounds) { Recent = recent };
668
return new(
PanelActionKind
.OpenIn, host, target.Bounds)
675
return new(
PanelActionKind
.ShowInFolder, host, target.Bounds) { Recent = recent };
678
return new(
PanelActionKind
.CopyPath, host, target.Bounds) { Recent = recent };
681
return new(
PanelActionKind
.TogglePin, host, target.Bounds) { Recent = recent };
684
return new(
PanelActionKind
.RemoveRecent, host, target.Bounds) { Recent = true };
688
return new(
PanelActionKind
.ToggleRecent, Anchor: target.Bounds);
700
PanelConfirmKind.ClearRecent => new(
PanelActionKind
.ClearRecent, Anchor: target.Bounds),
701
_ => new(
PanelActionKind
.RemoveRecent, host, target.Bounds) { Recent = true }
708
return new(
PanelActionKind
.SetLaunchAtSignIn, Anchor: target.Bounds) { Enabled = _settings?.Startup?.Enabled != true };
710
return new(
PanelActionKind
.Documentation, Anchor: target.Bounds);
712
return new(
PanelActionKind
.Settings, Anchor: target.Bounds);
714
return new(
PanelActionKind
.Quit, Anchor: target.Bounds);
src\Aspire.Tray\Common\TrayPanelScene.cs (2)
271
internal 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)
149
Assert.Equal(
PanelActionKind
.ToggleRecent, response.Action?.Kind);
230
Assert.Equal(new PanelAction(
PanelActionKind
.OpenIn, host, default) { Application = "Terminal" },
232
Assert.Equal(
PanelActionKind
.ShowInFolder, Pick(PanelTargetKind.ShowInFolder)?.Kind);
233
Assert.Equal(
PanelActionKind
.CopyPath, Pick(PanelTargetKind.CopyPath)?.Kind);
235
Assert.Equal(
PanelActionKind
.TogglePin, pin?.Kind);
257
Assert.Equal(new PanelAction(
PanelActionKind
.RemoveRecent, recent, remove.Bounds) { Recent = true }, action);
277
Assert.Equal(
PanelActionKind
.Stop, stop.Action?.Kind);
308
Assert.Equal(
PanelActionKind
.Close, panel.Key(PanelKey.Escape).Action?.Kind);
393
Assert.Equal(
PanelActionKind
.Stop, Click(panel, Target(panel, PanelTargetKind.Stop, state.AppHosts[0]).HitBounds).Action?.Kind);
394
Assert.Equal(
PanelActionKind
.OpenDashboard, Click(panel, Target(panel, PanelTargetKind.Dashboard, state.AppHosts[0]).HitBounds).Action?.Kind);
396
Assert.Equal(
PanelActionKind
.Start, start?.Kind);
398
Assert.Equal(
PanelActionKind
.Settings, Click(panel, panel.Scene.Targets.Single(t => t.Kind == PanelTargetKind.Settings).HitBounds).Action?.Kind);
399
Assert.Equal(
PanelActionKind
.Quit, Click(panel, panel.Scene.Targets.Single(t => t.Kind == PanelTargetKind.Quit).HitBounds).Action?.Kind);
400
Assert.Equal(
PanelActionKind
.Documentation, Click(panel, panel.Scene.Targets.Single(t => t.Kind == PanelTargetKind.Documentation).HitBounds).Action?.Kind);
440
Assert.Equal(
PanelActionKind
.Stop, response.Action?.Kind);
545
Assert.Equal(
PanelActionKind
.Close, panel.Key(PanelKey.Escape).Action?.Kind);
557
Assert.Equal(new PanelAction(
PanelActionKind
.Stop, state.AppHosts[1], Target(panel, PanelTargetKind.Stop, state.AppHosts[1]).Bounds), action);
586
Assert.Equal(
PanelActionKind
.Close, panel.Key(PanelKey.Escape).Action?.Kind);
610
Assert.Equal(
PanelActionKind
.Documentation, action?.Kind);
642
Assert.Equal(
PanelActionKind
.ClearRecent, Click(panel, accept.HitBounds).Action?.Kind);
659
Assert.Equal(
PanelActionKind
.RemoveRecent, action?.Kind);
668
Assert.Equal(
PanelActionKind
.Settings, Click(panel, panel.Scene.Targets.Single(t => t.Kind == PanelTargetKind.Settings).HitBounds).Action?.Kind);
681
Assert.Equal(
PanelActionKind
.SetLaunchAtSignIn, setLaunch?.Kind);
1248
Assert.Equal(
PanelActionKind
.ClearRecent, clear?.Kind);
1335
Assert.Equal(
PanelActionKind
.Quit, panel.Invoke(quit.Target.Key).Action?.Kind);