Repository navigation
chore(deps): bump MSTest.TestFramework to 4.3.3 and Uno.UI.RuntimeTests.Engine to 2.0.0-dev.89 - #1649
Conversation
…ts.Engine to 2.0.0-dev.89 - RuntimeTests.Engine 2.0.0-dev.89 requires MSTest.TestFramework >= 4.3.3; the 2.1.2 central pin fails restore with NU1605 in every sample head (canary build 235212) - Suppress MSTEST0002/0003/0009 in Uno.Toolkit.RuntimeTests: the engine discovers internal test classes, which the MSTest analyzers do not know about (same as uno.csharpmarkup) - Assert.ThrowsException -> Assert.ThrowsExactly (removed in MSTest 4) - Fix analyzer findings: swapped expected/actual (MSTEST0017), redundant DynamicDataSourceType (MSTEST0052), and asserts in an async void Popup.Opened handler that could never fail the test (MSTEST0040) - ProvideValue_ZeroSize_NoSizeChange compared a Layout? to a string (CS0411 under MSTest 4); assert the text and resolved layout are unchanged instead - Remove MSTest's transitive global using from the sample apps, where it made [Description] ambiguous with System.ComponentModel Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1649.eastus2.azurestaticapps.net |
…MSTest analyzers - Add [assembly: DiscoverInternals] so MSTEST0002/0003/0009 accept the internal test classes the engine already discovers - Drop the MSTEST0002/0003/0009 NoWarn from Uno.Toolkit.RuntimeTests.csproj Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Move the Using Remove for Microsoft.VisualStudio.TestTools.UnitTesting into samples/Directory.Build.targets, which NuGet's package targets are imported before - Drop the custom target hooked to the SDK's GenerateGlobalUsings from samples/Directory.Build.props - Chain the new file to the root Directory.Build.targets Co-Authored-By: Claude Opus 5.5 <[email protected]>
- AGENTS.md: headless runs need UNO_RUNTIME_TESTS_OUTPUT_PATH as well as --runtime-tests, or the app idles in the interactive runner - specs/lessons.md: record the idle local run and how to confirm a run actually started Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1649.eastus2.azurestaticapps.net |
- Make the 33 internal [TestClass] types public, matching the 22 that already are, so MSTEST0002/0003/0009 pass without an opt-out - Remove [assembly: DiscoverInternals] so the analyzers keep flagging new internal test classes Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1649.eastus2.azurestaticapps.net |
…iles - Convert the 10 block-scoped test files this PR already edits, with Roslyn's IDE0161 fix; apart from the namespace line and braces, only indentation changes - ItemsRepeaterExtensionTests.ISelectionInfo: SelectionData and SelectionSource were declared after the namespace block, in the global namespace; they now live in Uno.Toolkit.RuntimeTests.Tests (used only in that file) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1649.eastus2.azurestaticapps.net |
GitHub Issue (If applicable): #
PR Type
What is the current behavior?
The toolkit canary (build #235212) bumps
Uno.UI.RuntimeTests.Enginefrom 2.0.0-dev.79 to 2.0.0-dev.89. That version requiresMSTest.TestFramework >= 4.3.3, and our central pin is 2.1.2. As a result, all 8 sample jobs and the Hot-Reload job fail restore:mainhits the same failure as soon as it takes Engine dev.89.What is the new behavior?
MSTest.TestFramework2.1.2 → 4.3.3, andUno.UI.RuntimeTests.Enginedev.79 → dev.89, together.MSTest.Analyzers, which caused 408 errors underTreatWarningsAsErrors:public:MSTEST0002/0003/0009(392 of the errors). 33 test classes wereinternal, and MSTEST0003/0009 only flagged the public members of those classes, so nothing else needed fixing. They're nowpubliclike the other 22, with no suppression and noDiscoverInternals. The diff is one modifier per class declaration (34 files).Assert.ThrowsException→Assert.ThrowsExactly, since v4 removedThrowsException(TabBarTests).AutoLayoutTestandDrawerFlyoutTests.DynamicDataSourceType.Method(MSTEST0052).NavigationBarTests.MainCommand_In_Popup_Without_Page: its asserts were inside anasync voidPopup.Openedlambda (MSTEST0040), so they could never fail the test. The test now captures the result through aTaskCompletionSource(with a 2 s timeout, likeExtendedSplashScreenTests) and asserts in the test body.ResponsiveExtensionsTests.ProvideValue_ZeroSize_NoSizeChangecompared aLayout?to astring(CS0411 with v4's genericAreEqual<T>), which could never pass. It's hidden today because the class is[Ignore]d on Uno. It now asserts that the text and the resolved layout are unchanged.buildTransitivetargets addglobal using Microsoft.VisualStudio.TestTools.UnitTestingto every consumer that hasImplicitUsings, which includes the sample apps. That made[Description]ambiguous withSystem.ComponentModel. A newsamples/Directory.Build.targetsremoves that using with a static<Using Remove>, and chains to the rootDirectory.Build.targets. It has to be a.targetsfile because NuGet imports the package'sUsingafterDirectory.Build.propsbut beforeDirectory.Build.targets. The sample code doesn't use MSTest.AGENTS.md: a headless runtime-test run also needsUNO_RUNTIME_TESTS_OUTPUT_PATH. Without it,--runtime-tests=just opens the interactive runner, which sits idle. Recorded inspecs/lessons.md.PR Checklist
Other information
Verified locally on Windows,
net10.0-desktop, Material head:dotnet build … -c Release: 0 errors. Its 100 warnings matchmain's count: existing nullability warnings in sample code, plus the AndroidXNU1608restore warning.-c Debug: 0 errors.UNO_RUNTIME_TESTS_RUN_TESTS='{}'andUNO_RUNTIME_TESTS_OUTPUT_PATH, plus--runtime-tests=): 361 total, 361 passed, 0 failed, 11 skipped.maingives the same counts, so test discovery is unchanged. The touched tests that run on desktop all pass, including the reworkedMainCommand_In_Popup_Without_Page(Back/Action).AttachedProperty_Inheritance(WinAppSDK only). CI covers those.Related: #1648 (syncs
canaries/devwithmainto fix the separate NETSDK1147 failure in the Packages job).🤖 Generated with Claude Code