Repository navigation
Fix gui test search box - #6
Merged
Merged
Conversation
Maverick-F
commented
Nov 10, 2026
Contributor
- 96ef36d Find the tool search box by its accessible name, not as the first text box (from 6962470)
- b3d778a Run the pytest-qt tests off screen with an empty home folder of their own (from 91c8eed). The message says its test_tool_forms.py changes were left out and why.
- 278fb03 Fix the two failing pytest-qt tests
…e first Edit With the left side in splitters, UI Automation lists the tool form first, so the window's first Edit was the form's input file box: select_tool typed tool names there, the tree was never filtered, and tools outside the expanded Mapping category weren't found. The search box now has the accessible name "Search tools", and tool_search_box() finds it by that name. From 6962470 in BERATool/beratools_full.
The pytest-qt tests showed their windows on the desktop, and used the user's saved GUI settings in ~/.beratools: a saved value changed the forms they check, and the tests wrote the settings back. conftest now gives them a temporary home folder (USERPROFILE and HOME) and sets QT_QPA_PLATFORM to offscreen unless it is set, before beratools.gui is imported. From 91c8eed in BERATool/beratools_full, without its test_tool_forms.py changes: the tests they touch aren't here, or already set their paths explicitly.
TestGroundFootprint::test_round_trip used the layer footprint_rel, which tests/data/integration_aoi.gpkg doesn't have; it now uses footprint_abs. TestToolHistoryPersistence::test_switch_away_and_back_restores_saved_parameter saved a form whose required input and output files are empty, so get_widgets_arguments() returned None and the patched add_tool_history failed. Only the numeric round trip is under test, so it reads the raw values with get_widgets_values() instead, as in beratools_full.
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.