Skip to content

Updating tests to use TUnit and MTP #3838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Jun 27, 2025
Merged

Updating tests to use TUnit and MTP #3838

merged 28 commits into from
Jun 27, 2025

Conversation

Keboo
Copy link
Member

@Keboo Keboo commented Apr 25, 2025

No description provided.

@Keboo Keboo force-pushed the tUnit branch 2 times, most recently from a45772f to df4803d Compare June 13, 2025 07:54
@Keboo Keboo force-pushed the tUnit branch 2 times, most recently from e9ab268 to 83d0ec8 Compare June 23, 2025 06:24
Keboo added 24 commits June 26, 2025 21:13
Ensures that asynchronous delay calls use cancellation tokens to allow for tests to be cancelled correctly.
Updates the test suite to use TUnit for improved test clarity and maintainability.
Removes unused xunit packages and addresses nullable warnings in RatingBar converters.
Also includes changes to CustomColorTheme, DataGridAssist, DialogHost, DrawerHost, FlipperAssist, Internal/TreeListViewItemsCollection, Label, MaterialDesignThemes.Wpf.Tests.csproj, MdixHelper, PackIcon, PopupBox, RatingBar, SnackbarMessageQueue, TextBlock, TextBox, Theme and Transitioner tests.
Updates test framework from Fact to Test.

Updates tests to use Assert.That for improved readability and consistency.
Updates tests to be async to prevent possible deadlocks and improve reliability.
Removes the TUnit library and associated code from test projects, modernizing testing using the default testing framework.
Converts the DecimalUpDown test to use the `Arguments` attribute and updates assertions to improve reliability and clarity.
Updates TimePicker unit tests to use MethodDataSource with Func to prevent test data from being eagerly evaluated, resolving issues with the test framework.
Updates collection initialization to use more concise syntax.
Adds tests for the ButtonProgressAssist, CheckBoxAssist, ColorPicker, and DataGridAssist classes.
Adds a new test executor and removes redundant STAThreadExecutor attributes.
Adds NotInParallel attribute to CalendarFormatInfoTests and DialogHostTests.
Refactors the PreviewIndicatorTransformXConverter and PreviewIndicatorTransformYConverter.
Updates the path for screenshot artifacts to target the .NET 9 framework.
Corrects the artifact upload path in the build workflow.
Uses IsCloseTo method for asserting coordinate proximity in UI tests for ComboBoxes, DatePickers, PasswordBoxes, and TextBoxes.
This improves the accuracy and reliability of the tests by checking if the coordinates are within a specified tolerance range.
Updates several NuGet package versions, including Microsoft.NET.Test.Sdk, TUnit, and XAMLTest.

Fixes a potential issue in a test case by using CancellationToken.None instead of TestContext.Current!.CancellationToken
Corrects failing UI tests by adjusting assertions and adding exception handling.

The fixes improve the stability and reliability of the UI test suite.
Updates test assertion to expect a null text value when a combo box is uninitialized.
This corrects the expected behavior of the test.
Updates the artifact upload path in the build workflow to correctly target the .NET 9 framework.
This resolves an issue where artifacts were not being correctly uploaded due to an incorrect target framework name.
Keboo added 3 commits June 26, 2025 21:13
Skips a ColorPicker test that was failing before the move to Machine.Time.Past due to timing issues in the while loop.
Introduces a `ControlHost` class to ensure the `DialogHost` is properly unloaded when the test is complete.
This prevents orphaned `DialogHost` instances from interfering with subsequent tests.
@Keboo Keboo merged commit f31fe78 into master Jun 27, 2025
2 checks passed
@Keboo Keboo deleted the tUnit branch June 27, 2025 06:04
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.

1 participant