diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index e0cb43025..cee722df7 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -47,8 +47,6 @@ jobs:
run: |
dotnet test Tests/IntegrationTests --no-build --verbosity normal --diag:logs/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true
- # mv -v Tests/IntegrationTests/TestResults/*/*.* TestResults/IntegrationTests/
-
- name: Upload Test Logs
if: always()
uses: actions/upload-artifact@v4
diff --git a/Examples/UICatalog/Scenarios/Mazing.cs b/Examples/UICatalog/Scenarios/Mazing.cs
index a9954d017..0cf2e1bee 100644
--- a/Examples/UICatalog/Scenarios/Mazing.cs
+++ b/Examples/UICatalog/Scenarios/Mazing.cs
@@ -5,7 +5,7 @@ namespace UICatalog.Scenarios;
[ScenarioMetadata ("A Mazing", "Illustrates how to make a basic maze game.")]
[ScenarioCategory ("Drawing")]
-[ScenarioCategory ("Mouse and KeyBoard")]
+[ScenarioCategory ("Mouse and Keyboard")]
[ScenarioCategory ("Games")]
public class Mazing : Scenario
{
@@ -33,7 +33,7 @@ public class Mazing : Scenario
_top.KeyBindings.Add (Key.CursorDown, Command.Down);
// Changing the key-bindings of a View is not allowed, however,
- // by default, Toplevel does't bind any of our movement keys, so
+ // by default, Toplevel doesn't bind any of our movement keys, so
// we can take advantage of the CommandNotBound event to handle them
//
// An alternative implementation would be to create a TopLevel subclass that
diff --git a/Examples/UICatalog/Scenarios/Scrolling.cs b/Examples/UICatalog/Scenarios/Scrolling.cs
index 6b14d755b..b79964596 100644
--- a/Examples/UICatalog/Scenarios/Scrolling.cs
+++ b/Examples/UICatalog/Scenarios/Scrolling.cs
@@ -1,4 +1,8 @@
-namespace UICatalog.Scenarios;
+#nullable enable
+
+using System.Diagnostics;
+
+namespace UICatalog.Scenarios;
[ScenarioMetadata ("Scrolling", "Content scrolling, IScrollBars, etc...")]
[ScenarioCategory ("Controls")]
@@ -6,6 +10,8 @@
[ScenarioCategory ("Tests")]
public class Scrolling : Scenario
{
+ private object? _progressTimer = null;
+
public override void Main ()
{
Application.Init ();
@@ -38,10 +44,6 @@ public class Scrolling : Scenario
app.Add (demoView);
- //// NOTE: This call to EnableScrollBar is technically not needed because the reference
- //// NOTE: to demoView.HorizontalScrollBar below will cause it to be lazy created.
- //// NOTE: The call included in this sample to for illustration purposes.
- //demoView.EnableScrollBar (Orientation.Horizontal);
var hCheckBox = new CheckBox
{
X = Pos.X (demoView),
@@ -52,10 +54,6 @@ public class Scrolling : Scenario
app.Add (hCheckBox);
hCheckBox.CheckedStateChanged += (sender, args) => { demoView.HorizontalScrollBar.Visible = args.Value == CheckState.Checked; };
- //// NOTE: This call to EnableScrollBar is technically not needed because the reference
- //// NOTE: to demoView.HorizontalScrollBar below will cause it to be lazy created.
- //// NOTE: The call included in this sample to for illustration purposes.
- //demoView.EnableScrollBar (Orientation.Vertical);
var vCheckBox = new CheckBox
{
X = Pos.Right (hCheckBox) + 3,
@@ -96,8 +94,6 @@ public class Scrolling : Scenario
app.Add (progress);
- var pulsing = true;
-
app.Initialized += AppOnInitialized;
app.Unloaded += AppUnloaded;
@@ -108,17 +104,25 @@ public class Scrolling : Scenario
return;
- void AppOnInitialized (object sender, EventArgs e)
+ void AppOnInitialized (object? sender, EventArgs e)
{
bool TimerFn ()
{
progress.Pulse ();
- return pulsing;
+ return _progressTimer is { };
}
- Application.AddTimeout (TimeSpan.FromMilliseconds (200), TimerFn);
+ _progressTimer = Application.AddTimeout (TimeSpan.FromMilliseconds (200), TimerFn);
+ }
+
+ void AppUnloaded (object? sender, EventArgs args)
+ {
+ if (_progressTimer is { })
+ {
+ Application.RemoveTimeout (_progressTimer);
+ _progressTimer = null;
+ }
}
- void AppUnloaded (object sender, EventArgs args) { pulsing = false; }
}
}
\ No newline at end of file
diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings
index 95a7dccbf..4e6d0e05b 100644
--- a/Terminal.sln.DotSettings
+++ b/Terminal.sln.DotSettings
@@ -418,6 +418,7 @@
True
True
True
+ True
True
True
True
diff --git a/Tests/IntegrationTests/UICatalog/ScenarioTests.cs b/Tests/IntegrationTests/UICatalog/ScenarioTests.cs
index 5e581bc53..a0befb9f4 100644
--- a/Tests/IntegrationTests/UICatalog/ScenarioTests.cs
+++ b/Tests/IntegrationTests/UICatalog/ScenarioTests.cs
@@ -43,7 +43,7 @@ public class ScenarioTests : TestsAllViews
var scenario = Activator.CreateInstance (scenarioType) as Scenario;
var scenarioName = scenario!.GetName ();
- uint abortTime = 2200;
+ uint abortTime = 5000; // Scrolling scenario can take up to 3 seconds to init on slow CI machines
object? timeout = null;
var initialized = false;
var shutdownGracefully = false;