Repository navigation
[Sessions] Restore the main window settings of the user after a run of UI tests - #137
Merged
Merged
Conversation
Nice3point
marked this pull request as ready for review
November 1, 2026 13:14
There was a problem hiding this comment.
🔵 Needs a closer look
The window-settings fix changes persistent user settings through Injector dependencies outside the diff, and runtime verification covers only Revit 2027, leaving restoration on Revit 2021–2026 requiring maintainer validation.
No open issues 🎉
What changed in this PR
This PR updates the Revit Injector dependency to restore the user’s window position, size, and maximized state after UI test sessions.
Changes:
- Upgrades Revit Injector patch versions for Revit 2021–2027.
- Documents the window-restoration fix under release
2027.0.9. - Removes declared add-in identity tests from both application test classes because that behavior is covered by the dependency.
| File | Description |
|---|---|
tests/Nice3point.TUnit.Revit.Tests/ApplicationUiTests.cs |
Removes the declared add-in identity test for UI mode. |
tests/Nice3point.TUnit.Revit.Tests/ApplicationTests.cs |
Removes the declared add-in identity test for non-UI mode. |
Directory.Packages.props |
Updates Revit Injector to *.1.10 and 2027.0.10. |
CHANGELOG.md |
Records the window-restoration fix and links issue #135. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
What is this about:
After a run of
RevitApiUiTesttests, Revit opens its window at the position, the size, and the maximized state it had before the run.Description:
What changed
*.1.10and2027.0.10patch versions.The
2027.0.10release restores the window settings of the user once the hidden Revit of a UI test session exits.CHANGELOG.mdlists the fix under2027.0.9.ApplicationTestsandApplicationUiTestsdropActiveAddInId_DeclaredClient_ReturnsTheDeclaredAddIn.The dependency that resolves the
RevitClientattribute tests the declared add-in in both modes.The base classes add no code to that path.
How verified
Release.R21,Release.R24, andRelease.R27, zero warnings, zero errors.Release.R27: full suite, 125 passed, 3 skipped, zero failed.windowPlacementand[Windows] MaximizedofRevit.iniare unchanged after the full suite.300,200,1200,800andMaximized=1stored before the run,ApplicationUiTestspasses.Both values are unchanged after the run.
Quality Checklist