Skip to content

Conversation

@BDisp
Copy link
Collaborator

@BDisp BDisp commented Nov 17, 2025

Fixes

Proposed Changes/Todos

  • Added unit test that prove the issue
  • Added testing code in UICatalog to allow unit test being processed
  • Fix ForceDriver property to not change if an exist value already exist

Pull Request checklist:

  • I've named my PR in the form of "Fixes #issue. Terse description."
  • My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
  • My code follows the Terminal.Gui library design guidelines
  • I ran dotnet test before commit
  • I have made corresponding changes to the API documentation (using /// style comments)
  • My changes generate no new warnings
  • I have checked my code and corrected any poor grammar or misspellings
  • I conducted basic QA to assure all features are working

@BDisp BDisp requested a review from tig as a code owner November 17, 2025 00:58
@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.73%. Comparing base (a6258ed) to head (8a1e688).
⚠️ Report is 1 commits behind head on v2_develop.

Files with missing lines Patch % Lines
Terminal.Gui/App/Application.Driver.cs 77.77% 0 Missing and 2 partials ⚠️
Terminal.Gui/App/ApplicationImpl.Driver.cs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##           v2_develop    #4395      +/-   ##
==============================================
+ Coverage       65.05%   74.73%   +9.68%     
==============================================
  Files             388      388              
  Lines           46679    46692      +13     
  Branches         6640     6641       +1     
==============================================
+ Hits            30365    34896    +4531     
+ Misses          14346     9901    -4445     
+ Partials         1968     1895      -73     
Files with missing lines Coverage Δ
Terminal.Gui/App/ApplicationImpl.Lifecycle.cs 83.33% <100.00%> (+0.54%) ⬆️
Terminal.Gui/App/Mouse/MouseImpl.cs 77.72% <100.00%> (+3.43%) ⬆️
Terminal.Gui/App/ApplicationImpl.Driver.cs 65.88% <0.00%> (ø)
Terminal.Gui/App/Application.Driver.cs 40.62% <77.77%> (+11.45%) ⬆️

... and 141 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6258ed...8a1e688. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ing also initialize with driver instead of only by driver name.
@tig
Copy link
Collaborator

tig commented Nov 17, 2025

I really shouldn't have asked to make this testable. Sorry about all the trouble and complexity it caused.

The fix is clear and obvious. If you're ok with pulling out all the test stuff I'd be ok with that.

@BDisp
Copy link
Collaborator Author

BDisp commented Nov 17, 2025

I really shouldn't have asked to make this testable. Sorry about all the trouble and complexity it caused.

No problem, we only arrive at some conclusion and experience through doing it.

The fix is clear and obvious. If you're ok with pulling out all the test stuff I'd be ok with that.

If you're referring to creating the Run method in the UICatalog class and its unit test, I can remove that code. In fact, simply adding a Debug.Assertion of the current driver before and after opening a scenario in UICatalog is sufficient to verify that it's correct.

Copy link
Collaborator

@tig tig left a comment

Choose a reason for hiding this comment

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

Great stuff. Nice work on the core issue and on fixing my screwups ;-).

@tig tig merged commit 1bd5e37 into gui-cs:v2_develop Nov 20, 2025
17 of 18 checks passed
@BDisp BDisp deleted the v2_4391_forcedriver-fix branch November 20, 2025 13:17
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.

Weird situation when DotNetDriver is running and then open any scenario the WindowsDriver or UnixDriver runs

2 participants