From f3cb4363dd9247f9ca373a646d6a356aab50624f Mon Sep 17 00:00:00 2001 From: Nice3point Date: Sun, 1 Nov 2026 13:01:32 +0300 Subject: [PATCH 1/2] [Sessions] Restore the main window settings of the user after a run of UI tests --- CHANGELOG.md | 7 +++++++ Directory.Packages.props | 14 +++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4f6ad9..a03f1dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 2027.0.9 + +## Bug fixes + +- Fixed Revit opening in a small window in a corner of the screen after a run of `RevitApiUiTest` tests https://github.com/Nice3point/RevitUnit/issues/135. + Revit opens its window at the position, the size, and the maximized state it had before the run. + # 2027.0.8 ## Revit client configuration diff --git a/Directory.Packages.props b/Directory.Packages.props index 093acfb..f431e2a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -28,13 +28,13 @@ - - - - - - - + + + + + + + From 77924779a1dd4af520595ae6c6ed3a352ab00b8d Mon Sep 17 00:00:00 2001 From: Nice3point Date: Sun, 1 Nov 2026 13:01:33 +0300 Subject: [PATCH 2/2] [Tests] Remove the active add-in tests of the base classes --- .../ApplicationTests.cs | 14 -------------- .../ApplicationUiTests.cs | 14 -------------- 2 files changed, 28 deletions(-) diff --git a/tests/Nice3point.TUnit.Revit.Tests/ApplicationTests.cs b/tests/Nice3point.TUnit.Revit.Tests/ApplicationTests.cs index a20d77b..fde5f39 100644 --- a/tests/Nice3point.TUnit.Revit.Tests/ApplicationTests.cs +++ b/tests/Nice3point.TUnit.Revit.Tests/ApplicationTests.cs @@ -24,20 +24,6 @@ public async Task Create_XYZ_ValidDistance() await Assert.That(point.DistanceTo(XYZ.Zero)).IsEqualTo(7).Within(0.1); } - [Test] - public async Task ActiveAddInId_DeclaredClient_ReturnsTheDeclaredAddIn() - { - // Arrange & Act - var addInId = Application.ActiveAddInId; - - // Assert - using (Assert.Multiple()) - { - await Assert.That(addInId.GetGUID()).IsEqualTo(Guid.Parse("B3E7F5A2-9C4D-4E81-A6F0-2D8C51E7B934")); - await Assert.That(addInId.GetAddInName()).IsEqualTo("Nice3point.TUnit.Revit.Tests"); - } - } - [Test] public async Task RevitSessionSetup_OffTheRevitThread_ThrowsInvalidOperationException() { diff --git a/tests/Nice3point.TUnit.Revit.Tests/ApplicationUiTests.cs b/tests/Nice3point.TUnit.Revit.Tests/ApplicationUiTests.cs index 01b5bb0..3f6727d 100644 --- a/tests/Nice3point.TUnit.Revit.Tests/ApplicationUiTests.cs +++ b/tests/Nice3point.TUnit.Revit.Tests/ApplicationUiTests.cs @@ -64,20 +64,6 @@ public async Task GetOpenUIViews_ActiveDocument_ContainsTheActiveView() await Assert.That(openViewIds).Contains(uiDocument.ActiveView.Id); } - [Test] - public async Task ActiveAddInId_DeclaredClient_ReturnsTheDeclaredAddIn() - { - // Arrange & Act - var addInId = UiApplication.ActiveAddInId; - - // Assert - using (Assert.Multiple()) - { - await Assert.That(addInId.GetGUID()).IsEqualTo(Guid.Parse("B3E7F5A2-9C4D-4E81-A6F0-2D8C51E7B934")); - await Assert.That(addInId.GetAddInName()).IsEqualTo("Nice3point.TUnit.Revit.Tests"); - } - } - [Test] public async Task CanPostCommand_BuiltInCommand_IsPostable() {