Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
if: always()
with:
name: coverage-report
path: Cyclotron.Tests/bin/Release/net10.0/TestResults/coverage.cobertura.xml
path: Cyclotron.Tests/bin/Release/net10.0-windows10.0.26100.0/TestResults/coverage.cobertura.xml
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

The coverage artifact path is hard-coded to a specific TFM folder name. This will break the workflow again if the test TFM changes (or if multi-targeting is introduced). Consider using a glob (e.g., Cyclotron.Tests/bin/Release/**/TestResults/coverage.cobertura.xml) or emitting the actual coverage path from the test step and reusing it for upload.

Copilot uses AI. Check for mistakes.
retention-days: 1

coverage:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System.Diagnostics.CodeAnalysis;

namespace Cyclotron.FileSystemAdapter.WinUI.Pickers;

/// <summary>
Expand All @@ -6,6 +8,7 @@ namespace Cyclotron.FileSystemAdapter.WinUI.Pickers;
/// <remarks>
/// This class provides a file open picker dialog for WinUI applications.
/// </remarks>
[ExcludeFromCodeCoverage(Justification = "Opens an interactive OS shell dialog; cannot be automated in tests.")]
internal class WinUIFileOpenPicker : IFileOpenPicker
{
/// <inheritdoc/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System.Diagnostics.CodeAnalysis;

namespace Cyclotron.FileSystemAdapter.WinUI.Pickers;

/// <summary>
Expand All @@ -6,6 +8,7 @@ namespace Cyclotron.FileSystemAdapter.WinUI.Pickers;
/// <remarks>
/// This class provides a file save picker dialog for WinUI applications.
/// </remarks>
[ExcludeFromCodeCoverage(Justification = "Opens an interactive OS shell dialog; cannot be automated in tests.")]
internal class WinUIFileSavePicker : IFileSavePicker
{
/// <inheritdoc/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System.Diagnostics.CodeAnalysis;

namespace Cyclotron.FileSystemAdapter.WinUI.Pickers;

/// <summary>
Expand All @@ -6,6 +8,7 @@ namespace Cyclotron.FileSystemAdapter.WinUI.Pickers;
/// <remarks>
/// This class provides a folder picker dialog for WinUI applications.
/// </remarks>
[ExcludeFromCodeCoverage(Justification = "Opens an interactive OS shell dialog; cannot be automated in tests.")]
internal class WinUIFolderPicker : IFolderPicker
{
/// <inheritdoc/>
Expand Down
4 changes: 3 additions & 1 deletion Cyclotron.FileSystemAdapter/WinUI/Pickers/WindowUtil.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.UI;
using System.Diagnostics.CodeAnalysis;
using Microsoft.UI;
using Windows.Win32;

namespace Cyclotron.FileSystemAdapter.WinUI.Pickers;
Expand All @@ -10,6 +11,7 @@ namespace Cyclotron.FileSystemAdapter.WinUI.Pickers;
/// This internal utility provides helper methods to get the active or foreground window ID,
/// which is required when creating WinUI file/folder picker dialogs that need to be parented to a specific window.
/// </remarks>
[ExcludeFromCodeCoverage(Justification = "Depends on an active Win32 window; cannot be exercised in a headless test runner.")]
internal static class WindowUtil
{
/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion Cyclotron.Tests/Cyclotron.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.26100.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
Comment on lines +4 to +5
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

The PR title suggests the change is limited to excluding picker classes from coverage, but this PR also changes the test target framework to a Windows-specific TFM and adds/rewrites substantial WinUI-focused unit/integration tests. Consider updating the PR title/description to reflect the expanded scope, or splitting the testing/TFM changes into a separate PR to keep review and rollback risk smaller.

Copilot uses AI. Check for mistakes.
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
Loading
Loading