Skip to content

More tests - #2096

Merged
beto-rodriguez merged 18 commits into
devfrom
more-tests
Feb 13, 2026
Merged

More tests#2096
beto-rodriguez merged 18 commits into
devfrom
more-tests

Conversation

@beto-rodriguez

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings February 12, 2026 20:11
@github-actions

github-actions Bot commented Feb 12, 2026

Copy link
Copy Markdown

Thanks for your contribution!

The build and test process is starting. This may take a while.
You can find more details below as the process continues or at the actions tab.


All packages have been packed successfully! 📦✅
You can download the NuGet packages for this build here.

The packages will be available for 30 days, you can either use them directly, or wait for this PR to be merged to have them published to NuGet.org.


Tests will start now, you can monitor their progress below or at the actions tab.

Test Results Summary (Failure) ❌ 😥

Core Windows Linux Mac Browser Android iOS
✅ passed ❌ failed ❌ failed ❌ failed ❌ failed ❌ failed ❌ failed

0 skipped.
561 passed.
85 failed. ❌

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds GPU/hardware acceleration tests and improves test organization. It introduces a new RendererName property to CoreMotionCanvas to enable testing of different rendering modes, adds tests for both CPU and GPU rendering in PieChartTests and CartesianChartTests, and consolidates Avalonia-specific tests by moving the virtualization test from a dedicated AvaloniaTests.cs file into CartesianChartTests.cs.

Changes:

  • Added RendererName property to CoreMotionCanvas for renderer identification
  • Added GPU rendering tests (ShouldLoadHardwareAcceleratedView) to verify hardware acceleration works correctly
  • Enhanced existing tests to verify CPU rendering by default
  • Consolidated Avalonia virtualization test into CartesianChartTests.cs and removed AvaloniaTests.cs
  • Updated build configuration comments to clarify GPU/VSYNC settings

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/SharedUITests/PieChartTests.cs Added GPU rendering test and CPU rendering verification to existing test
tests/SharedUITests/CartesianChartTests.cs Added GPU rendering test, CPU rendering verification, and moved Avalonia virtualization test
tests/SharedUITests/AvaloniaTests.cs Removed file - test moved to CartesianChartTests.cs
src/LiveChartsCore/Motion/CoreMotionCanvas.cs Added public RendererName property to expose renderer information
Directory.Build.props Updated comments to clarify GPU configuration options

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/SharedUITests/PieChartTests.cs Outdated
var sut = await App.NavigateTo<Samples.General.FirstChart.View>();
await sut.Chart.WaitUntilChartRenders();

Assert.DoesNotContain(sut.Chart.CoreCanvas.RendererName, "GPU");

Copilot AI Feb 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion assumes that GPU rendering is not enabled by default. However, if the ShouldLoadHardwareAcceleratedView test runs before this test and fails to restore settings, this assertion could fail. Consider making this test more resilient by explicitly setting the GPU mode to false at the start of the test, or ensuring proper test isolation.

Copilot uses AI. Check for mistakes.
Comment thread Directory.Build.props
Comment thread tests/SharedUITests/PieChartTests.cs Outdated
Comment thread tests/SharedUITests/CartesianChartTests.cs Outdated
@github-actions

github-actions Bot commented Feb 12, 2026

Copy link
Copy Markdown

Thanks for your contribution!

The build and test process is starting. This may take a while.
You can find more details below as the process continues or at the actions tab.


All packages have been packed successfully! 📦✅
You can download the NuGet packages for this build here.

The packages will be available for 30 days, you can either use them directly, or wait for this PR to be merged to have them published to NuGet.org.


Tests will start now, you can monitor their progress below or at the actions tab.

Test Results Summary (Failure) ❌ 😥

Core Windows Linux Mac Browser Android iOS
✅ passed ❌ failed ✅ passed ✅ passed ✅ passed ✅ passed ✅ passed

0 skipped.
1096 passed.
9 failed. ❌

Copilot AI review requested due to automatic review settings February 12, 2026 21:40
@github-actions

github-actions Bot commented Feb 12, 2026

Copy link
Copy Markdown

Thanks for your contribution!

The build and test process is starting. This may take a while.
You can find more details below as the process continues or at the actions tab.


All packages have been packed successfully! 📦✅
You can download the NuGet packages for this build here.

The packages will be available for 30 days, you can either use them directly, or wait for this PR to be merged to have them published to NuGet.org.


Tests will start now, you can monitor their progress below or at the actions tab.

Test Results Summary (Failure) ❌ 😥

Core Windows Linux Mac Browser Android iOS
✅ passed ❌ failed ✅ passed ✅ passed ✅ passed ✅ passed ✅ passed

0 skipped.
1790 passed.
4 failed. ❌

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +67 to +74
var sut = await App.NavigateTo<Samples.Pies.Basic.View>();
await sut.Chart.WaitUntilChartRenders();

Assert.Contains("GPU", sut.Chart.CoreCanvas.RendererName);
Assert.ChartIsLoaded(sut.Chart);

// restore default settings for other tests
LiveChartsCore.LiveCharts.Configure(config => config.HasRenderingSettings(builder => builder.UseGPU = false));

Copilot AI Feb 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test modifies global configuration (LiveCharts.Configure) and relies on cleanup code at the end. If the test fails or is interrupted before line 74, the GPU setting will remain enabled, potentially affecting subsequent tests. Consider using a try-finally block to ensure the configuration is always restored, or implement IDisposable/IAsyncLifetime for proper test cleanup.

Suggested change
var sut = await App.NavigateTo<Samples.Pies.Basic.View>();
await sut.Chart.WaitUntilChartRenders();
Assert.Contains("GPU", sut.Chart.CoreCanvas.RendererName);
Assert.ChartIsLoaded(sut.Chart);
// restore default settings for other tests
LiveChartsCore.LiveCharts.Configure(config => config.HasRenderingSettings(builder => builder.UseGPU = false));
try
{
var sut = await App.NavigateTo<Samples.Pies.Basic.View>();
await sut.Chart.WaitUntilChartRenders();
Assert.Contains("GPU", sut.Chart.CoreCanvas.RendererName);
Assert.ChartIsLoaded(sut.Chart);
}
finally
{
// restore default settings for other tests
LiveChartsCore.LiveCharts.Configure(config => config.HasRenderingSettings(builder => builder.UseGPU = false));
}

Copilot uses AI. Check for mistakes.
Comment on lines +113 to +120
var sut = await App.NavigateTo<Samples.General.FirstChart.View>();
await sut.Chart.WaitUntilChartRenders();

Assert.Contains("GPU", sut.Chart.CoreCanvas.RendererName);
Assert.ChartIsLoaded(sut.Chart);

// restore default settings for other tests
LiveChartsCore.LiveCharts.Configure(config => config.HasRenderingSettings(builder => builder.UseGPU = false));

Copilot AI Feb 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test modifies global configuration (LiveCharts.Configure) and relies on cleanup code at the end. If the test fails or is interrupted before line 120, the GPU setting will remain enabled, potentially affecting subsequent tests. Consider using a try-finally block to ensure the configuration is always restored, or implement IDisposable/IAsyncLifetime for proper test cleanup.

Suggested change
var sut = await App.NavigateTo<Samples.General.FirstChart.View>();
await sut.Chart.WaitUntilChartRenders();
Assert.Contains("GPU", sut.Chart.CoreCanvas.RendererName);
Assert.ChartIsLoaded(sut.Chart);
// restore default settings for other tests
LiveChartsCore.LiveCharts.Configure(config => config.HasRenderingSettings(builder => builder.UseGPU = false));
try
{
var sut = await App.NavigateTo<Samples.General.FirstChart.View>();
await sut.Chart.WaitUntilChartRenders();
Assert.Contains("GPU", sut.Chart.CoreCanvas.RendererName);
Assert.ChartIsLoaded(sut.Chart);
}
finally
{
// restore default settings for other tests
LiveChartsCore.LiveCharts.Configure(config => config.HasRenderingSettings(builder => builder.UseGPU = false));
}

Copilot uses AI. Check for mistakes.
Comment thread Directory.Build.props

<!--
used to test the library on multiple render modes,
used to test the library on multiple render modes, this config overrides the the settings defined by the user.

Copilot AI Feb 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase "overrides the the settings" contains a duplicate word "the". It should be "overrides the settings".

Suggested change
used to test the library on multiple render modes, this config overrides the the settings defined by the user.
used to test the library on multiple render modes, this config overrides the settings defined by the user.

Copilot uses AI. Check for mistakes.
@beto-rodriguez
beto-rodriguez marked this pull request as draft February 12, 2026 21:48
@github-actions

github-actions Bot commented Feb 12, 2026

Copy link
Copy Markdown

Thanks for your contribution!

The build and test process is starting. This may take a while.
You can find more details below as the process continues or at the actions tab.


All packages have been packed successfully! 📦✅
You can download the NuGet packages for this build here.

The packages will be available for 30 days, you can either use them directly, or wait for this PR to be merged to have them published to NuGet.org.


Tests will start now, you can monitor their progress below or at the actions tab.

Test Results Summary (Failure) ❌ 😥

Core Windows Linux Mac Browser Android iOS
✅ passed ❌ failed ✅ passed ❌ failed ✅ passed ✅ passed ✅ passed

0 skipped.
1671 passed.
6 failed. ❌

@github-actions

github-actions Bot commented Feb 12, 2026

Copy link
Copy Markdown

Thanks for your contribution!

The build and test process is starting. This may take a while.
You can find more details below as the process continues or at the actions tab.


All packages have been packed successfully! 📦✅
You can download the NuGet packages for this build here.

The packages will be available for 30 days, you can either use them directly, or wait for this PR to be merged to have them published to NuGet.org.


Tests will start now, you can monitor their progress below or at the actions tab.

Test Results Summary (Failure) ❌ 😥

Core Windows Linux Mac Browser Android iOS
# ❌ failed # # # # #

0 skipped.
3 passed.
1 failed. ❌

@github-actions

github-actions Bot commented Feb 12, 2026

Copy link
Copy Markdown

Thanks for your contribution!

The build and test process is starting. This may take a while.
You can find more details below as the process continues or at the actions tab.


All packages have been packed successfully! 📦✅
You can download the NuGet packages for this build here.

The packages will be available for 30 days, you can either use them directly, or wait for this PR to be merged to have them published to NuGet.org.


Tests will start now, you can monitor their progress below or at the actions tab.

Test Results Summary (Passed) ✅ 🥳

0 skipped.
0 failed.
1637 passed! ✅

@github-actions

github-actions Bot commented Feb 13, 2026

Copy link
Copy Markdown

Thanks for your contribution!

The build and test process is starting. This may take a while.
You can find more details below as the process continues or at the actions tab.


All packages have been packed successfully! 📦✅
You can download the NuGet packages for this build here.

The packages will be available for 30 days, you can either use them directly, or wait for this PR to be merged to have them published to NuGet.org.


Tests will start now, you can monitor their progress below or at the actions tab.

Test Results Summary (Failure) ❌ 😥

Core Windows Linux Mac Browser Android iOS
✅ passed ✅ passed ✅ passed ✅ passed ❌ failed ⚠️ cancelled ⚠️ cancelled

0 skipped.
1348 passed.
0 failed. ❌

@beto-rodriguez

Copy link
Copy Markdown
Collaborator Author

@copilot can you implement actions/cache@v5.0.3 into the .github/actions/detup-dotnet-and-workloads so it caches the used workloads?

Copilot AI commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

@beto-rodriguez I've opened a new pull request, #2097, to work on those changes. Once the pull request is ready, I'll request review from you.

@github-actions

github-actions Bot commented Feb 13, 2026

Copy link
Copy Markdown

Thanks for your contribution!

The build and test process is starting. This may take a while.
You can find more details below as the process continues or at the actions tab.


All packages have been packed successfully! 📦✅
You can download the NuGet packages for this build here.

The packages will be available for 30 days, you can either use them directly, or wait for this PR to be merged to have them published to NuGet.org.


Tests will start now, you can monitor their progress below or at the actions tab.

Test Results Summary (Failure) ❌ 😥

Core Windows Linux Mac Browser Android iOS
✅ passed ✅ passed ✅ passed ✅ passed ❌ failed ✅ passed ✅ passed

0 skipped.
3332 passed.
0 failed. ❌

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (4)

src/LiveChartsCore/Motion/CoreMotionCanvas.cs:183

                    foreach (var geometry in task.GetGeometries(this))
                    {
                        if (geometry is null) continue;
                        if (DisableAnimations) geometry.CompleteTransition(null);

                        geometry.IsValid = true;

                        if (!task.IsPaused)
                        {
                            context.ActiveOpacity = geometry.Opacity;
                            context.Draw(geometry);
                        }

                        isValid = isValid && geometry.IsValid;

                        if (geometry.IsValid && geometry.RemoveOnCompleted)
                            toRemoveGeometries.Add(
                                new Tuple<Paint, IDrawnElement>(task, geometry));
                    }

src/LiveChartsCore/Motion/CoreMotionCanvas.cs:339

        foreach (var zone in Zones)
            if (zone.RemoveTask(task))
                break;

src/LiveChartsCore/Motion/CoreMotionCanvas.cs:387

        foreach (var zone in Zones)
            if (zone.ContainsTask(task))
                return true;

src/LiveChartsCore/Motion/CoreMotionCanvas.cs:360

  • This assignment to geometry is useless, since its value is never read.
            foreach (var geometry in task.GetGeometries(this))

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +46 to +52
<PropertyGroup Condition="$(TestBuildTargetFramework) == 'net10.0-windows'">
<!--
workaround, not sure why hardware accelerated views is failing on net10.0-windows10.0.19041.0 in CI environments
im not able top reproduce the issue locally, ill assume for now that it is a false positive and just exclude that
hardware accelerated tests in this target.
-->
<DefineConstants>$(DefineConstants);TEST_HA_VIEWS</DefineConstants>

Copilot AI Feb 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic in this conditional compilation symbol definition appears inverted. The comment says the hardware accelerated views are failing on net10.0-windows in CI, so tests should be excluded. However, the code defines TEST_HA_VIEWS (suggesting tests should be included) when the target framework is net10.0-windows. This appears to be backwards - if tests are failing, the symbol should NOT be defined, or the conditional checks should use a different symbol like SKIP_HA_VIEWS.

Copilot uses AI. Check for mistakes.
<PropertyGroup Condition="$(TestBuildTargetFramework) == 'net10.0-windows'">
<!--
workaround, not sure why hardware accelerated views is failing on net10.0-windows10.0.19041.0 in CI environments
im not able top reproduce the issue locally, ill assume for now that it is a false positive and just exclude that

Copilot AI Feb 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are grammatical issues in this comment: "im" should be "I'm" and "ill" should be "I'll".

Suggested change
im not able top reproduce the issue locally, ill assume for now that it is a false positive and just exclude that
I'm not able to reproduce the issue locally, I'll assume for now that it is a false positive and just exclude that

Copilot uses AI. Check for mistakes.
test-id: ${{ matrix.id }}
workloads: ${{ matrix.workloads }}
# target-framework: ${{ matrix.tf }}
target-framework: ${{ matrix.tf }}

Copilot AI Feb 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The target-framework parameter is now being passed for all test-browser matrix entries, but the avalonia-browser entry doesn't define a 'tf' value in its matrix configuration. This means target-framework will be passed as an empty string to the run-tests action. Verify that the run-tests action handles empty or undefined target-framework values correctly, or add a tf value to the avalonia-browser matrix entry if it needs one.

Copilot uses AI. Check for mistakes.
include:
# - id: avalonia-ios
# workloads: ios
- id: avalonia-ios

Copilot AI Feb 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The avalonia-ios test has been re-enabled but doesn't define a 'tf' (target framework) value in its matrix configuration, while the run-tests action is called with target-framework: ${{ matrix.tf }} on line 319. This means an empty string will be passed for target-framework. Verify that the run-tests action handles empty target-framework values correctly, or add a tf value to the avalonia-ios matrix entry if required.

Suggested change
- id: avalonia-ios
- id: avalonia-ios
tf: net10.0-ios

Copilot uses AI. Check for mistakes.
Comment thread Directory.Build.props

<!--
used to test the library on multiple render modes,
used to test the library on multiple render modes, this config overrides the the settings defined by the user.

Copilot AI Feb 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo in the comment: "the the" should be just "the".

Suggested change
used to test the library on multiple render modes, this config overrides the the settings defined by the user.
used to test the library on multiple render modes, this config overrides the settings defined by the user.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants