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 85.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.56%. Comparing base (0995148) to head (430d419).

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       74.56%   74.56%           
===========================================
  Files             388      388           
  Lines           46568    46585   +17     
  Branches         6548     6550    +2     
===========================================
+ Hits            34723    34736   +13     
- Misses           9993     9996    +3     
- Partials         1852     1853    +1     
Files with missing lines Coverage Δ
Terminal.Gui/App/ApplicationImpl.Lifecycle.cs 89.62% <100.00%> (+0.65%) ⬆️
Terminal.Gui/App/Mouse/MouseImpl.cs 77.03% <100.00%> (+0.11%) ⬆️
Terminal.Gui/App/ApplicationImpl.Driver.cs 70.58% <0.00%> (ø)
Terminal.Gui/App/Application.Driver.cs 40.62% <77.77%> (+11.45%) ⬆️

... and 2 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 0995148...430d419. 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.

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