Skip to content

Stabilize the Select By Attributes typed-field test - #3209

Merged
Mavrick-F merged 1 commit into
opengeos:mainfrom
robmarkcole:fix/3193-select-values-test
Nov 28, 2026
Merged

Mavrick-F merged 1 commit into
opengeos:mainfrom
robmarkcole:fix/3193-select-values-test

Conversation

@robmarkcole

@robmarkcole robmarkcole commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Select By Attributes test could fail after opening Values because the background match count requested more repaints than the harness allowed. The Ubuntu run for #3193 took six frames to settle against a limit of four.

The test now steps through the typing and click events and gives the Values menu up to ten steps to expose the 'Asia' button. It clicks that button and checks the exact expression, continent = 'Asia' (including the trailing space). Only this test changes.

Testing

  • The focused test passed on macOS with cargo test --locked -p rustgis-ui-egui --lib dialogs::tests::select_by_attributes_values_list_follows_the_field_typed -- --exact. The same test binary passed 100 consecutive reruns.
  • cargo xtask ci passed formatting and workspace Clippy, then stopped at menu::tests::items_name_commands_that_exist on macOS. The Select All shortcut assertion also failed when run on the untouched base commit, 3ae52348.

Codex authored the test change and ran the checks above.

UI evidence

No visible UI change.

Related issue

Closes #3193.

Summary by CodeRabbit

  • Tests
    • Improved the Select By Attributes values-list test to check for the “Asia” option across multiple UI frames before selecting it. The expected clause remains unchanged.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Select By Attributes Values-list test now advances the egui harness one frame at a time and waits up to 10 steps for the 'Asia' option before clicking it. The resulting clause assertion is unchanged.

Changes: Values-list test

Layer / File(s) Summary
Wait for the Values option
crates/ui-egui/src/dialogs.rs
The test replaces fixed run() calls with individual step() calls and waits up to 10 steps for the 'Asia' button. The clause assertion remains unchanged.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related PRs

Suggested reviewers: mavrick-f

Merge Risk: Minimal · up to bb941

This change only adjusts a unit test to make it more deterministic. It has no production behavior impact, and no concrete merge-blocking risk was identified.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive Issue #3193 requires the flaky test dialogs::tests::select_by_attributes_values_list_follows_the_field_typed to stop failing intermittently. Its guidance is to wait for completion when the test wait… Provide readable evidence of the changed test hunk in crates/ui-egui/src/dialogs.rs at head (or a readable diff against base). Show whether the wait ends on a completion condition, such as the background match count reaching idle or the `…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the main change: stabilizing the Select By Attributes typed-field test. The raw summary confirms the only change is the frame-stepping logic in that test in crates/ui-egui/src/dialogs.…
Description check Passed The description fills the required Summary, Testing, and UI evidence sections. The Summary explains the cause (repaint limit exceeded on the Ubuntu run for #3193) and the fix (stepping through events …
Out of Scope Changes check Passed The PR summary and raw summary state that only the Select By Attributes Values-list test changes, in crates/ui-egui/src/dialogs.rs (+11/-5). That test is the test named in directly linked issue #319…
Full details: Title check

Explanation

The title names the main change: stabilizing the Select By Attributes typed-field test. The raw summary confirms the only change is the frame-stepping logic in that test in crates/ui-egui/src/dialogs.rs. The title is specific and short, and it matches the objectives, which describe the same flakiness fix for issue #3193.

Full details: Description check

Explanation

The description fills the required Summary, Testing, and UI evidence sections. The Summary explains the cause (repaint limit exceeded on the Ubuntu run for #3193) and the fix (stepping through events and allowing up to ten steps for the Values menu). Testing lists the focused test runs and the failing CI step on macOS. UI evidence states 'No visible UI change.', which the template allows. The Related issue section links #3193. The template's placeholder comments were removed, as expected. One gap: the Testing section does not state that the ubuntu-latest failure was reproduced or verified fixed on Linux, so the Linux result remains unconfirmed.

Full details: Out of Scope Changes check

Explanation

The PR summary and raw summary state that only the Select By Attributes Values-list test changes, in crates/ui-egui/src/dialogs.rs (+11/-5). That test is the test named in directly linked issue #3193, so the change is within the linked scope. No unrelated change is shown in the summary. The text diff could not be read, so hunk-level confirmation is not available. The PR description's claim that the menu::tests::items_name_commands_that_exist failure also occurs on base is a separate test issue and does not relate to this change.

Full details: Linked Issues check

Explanation

Issue #3193 requires the flaky test dialogs::tests::select_by_attributes_values_list_follows_the_field_typed to stop failing intermittently. Its guidance is to wait for completion when the test waits on a timer. The PR summary and raw summary say the test now advances the egui harness one frame at a time and checks for the 'Asia' option for up to 10 steps. A bounded step count is a fixed budget, not a completion wait. The commit message says the test runs "without waiting for idle", which points the other way. The text diff could not be read: the tool reported changed blobs missing from the checkout. The test body at head could not be read either, because file reads return the whole of crates/ui-egui/src/dialogs.rs and it truncates before the test module. So it is not established whether the test now waits on a completion condition or only on a larger frame budget. The PR also reports 100 consecutive local passes on macOS. It does not report a Ubuntu run, which is where the failure occurred.

Resolution

Provide readable evidence of the changed test hunk in crates/ui-egui/src/dialogs.rs at head (or a readable diff against base). Show whether the wait ends on a completion condition, such as the background match count reaching idle or the 'Asia' option appearing, rather than after a fixed number of frames. Provide a passing run on ubuntu-latest or equivalent evidence for the flaky path.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit taps the frame once more,
Then waits beside the Values door.
“Asia,” appears within the pane,
The clause stays just the same.
The test hops on, its timing tame.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 70f7fe01-ce58-4b98-b61e-5d617a344559
Commits

Reviewing files that changed from the base of the PR and between e041087 and bb941ab.

Files selected for processing: 1

  • crates/ui-egui/src/dialogs.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@robmarkcole

Copy link
Copy Markdown
Contributor Author

For the linked-issue check, the test steps the harness and checks the menu after each step:

for _ in 0..10 {
    h.step();
    if h.query_by_role_and_label(Role::Button, "'Asia'").is_some() {
        break;
    }
}
h.get_by_role_and_label(Role::Button, "'Asia'").click();

The loop exits as soon as the option appears. If it never appears, the required lookup fails on the next line. The test then checks the exact expression after the click. Test at the reviewed commit

On ubuntu-latest, select_by_attributes_values_list_follows_the_field_typed passed on its first attempt in 0.076 seconds. All 2,102 tests in that job passed. Ubuntu Rust test log

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs preview

Commit bb941ab from a fork built, but isn't published until a maintainer adds the preview label (once per commit).

@Mavrick-F
Mavrick-F added this pull request to the merge queue Nov 28, 2026
Merged via the queue into opengeos:main with commit 00d7de9 Nov 28, 2026
28 checks passed
elpidioassinaturas pushed a commit to elpidioassinaturas/RustGIS that referenced this pull request Nov 28, 2026
Brings in opengeos#3227, opengeos#3228 and opengeos#3209, merged meanwhile. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Flaky test: rustgis-ui-egui dialogs::tests::select_by_attributes_values_list_follows_the_field_typed

2 participants