Improve logging of test for panel destruction #12291
Merged
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.
Link to issue number:
None
Summary of the issue:
While looking into #12220, I noticed a lot of logging noise for the tests for destruction of settings panels.
A little investigation showed that the same settings dialogs was being marked as destroyed previously because the
evt.skip()
was not called.
Calling
skip
is not appropriate, but it is also not necessary to log that the dialog which is already marked as destoyed, will be again.Description of how this pull request fixes the issue:
Use an enum for destroyed state, this logs better.
Only log if the dialog is not already marked as destoyed.
Improve what is logged so that the dialog is actually identifiable.
Example log message after PR:
Testing strategy:
Ran locally with the NVDA settings dialog, checked log.
Known issues with pull request:
None
Change log entry:
None, these were internal constants, meant for debugging purposes only.
Code Review Checklist:
This checklist is a reminder of things commonly forgotten in a new PR.
Authors, please do a self-review and confirm you have considered the following items.
Mark items you have considered by checking them.
You can do this when editing the Pull request description with an x:
[ ]
becomes[x]
.You can also check the checkboxes after the PR is created.