Skip to content

Stabilize the Select By Attributes wildcard test - #3228

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

Mavrick-F merged 1 commit into
opengeos:mainfrom
robmarkcole:fix/3207-wildcard-values-test

Conversation

@robmarkcole

@robmarkcole robmarkcole commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Select By Attributes wildcard test intermittently failed when opening the Values menu. In the Ubuntu failure, a background match count requested more repaints than the harness’s four-frame limit allowed.

The test now steps through each input and clicks the requested menu entry as soon as it appears. If the entry is still missing after ten steps, its lookup fails. The test checks both outcomes of selecting a value after LIKE: choosing 'a_b' preserves the clause and explains the wildcard, while choosing 'plain' inserts the value and clears the warning.

Testing

  • On Apple Silicon macOS, the focused test passed in 0.08 seconds. The same test binary then passed 100 consecutive reruns.
  • cargo xtask ci passed test hygiene, formatting, and workspace Clippy. The workspace suite stopped at the previously observed macOS Select All shortcut assertion in menu::tests::items_name_commands_that_exist.

Focused test command:

cargo test --locked -p rustgis-ui-egui --lib \
  dialogs::tests::select_by_attributes_values_list_says_why_a_wildcard_value_is_not_added_after_like \
  -- --exact

Codex authored the test change and ran the checks above.

UI evidence

No visible UI change.

Related issue

Closes #3207.

Summary by CodeRabbit

  • Tests
    • Improved reliability of the wildcard-value test by waiting for menu items to appear before selecting them.

@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 wildcard-value test now waits for each requested Values menu item to appear before clicking it. It uses the helper for both a_b and plain. Existing assertions remain unchanged.

Changes: Wildcard value test

Layer / File(s) Summary
Wait for Values menu entries
crates/ui-egui/src/dialogs.rs
The test adds a helper that opens Values, steps the UI up to 10 times while waiting for the requested button, then clicks it and steps once. The test uses the helper to select a_b and plain; existing assertions remain unchanged.

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

Change: Other · Severity of issue fixed: Low

Possibly related PRs

Suggested reviewers: mavrick-f, jgregoriorincon

Merge Risk: Minimal · up to 94dc5

This change makes a flaky UI test wait for the Values menu entry to appear before clicking it. It does not change product behavior, and no merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Select By Attributes wildcard test is made stable. The raw summary confirms the test now waits for the Values menu item before clicking it, which matches the title…
Description check Passed The description follows the template. It has a Summary that explains the flaky failure and the fix. It has a Testing section with the focused command, results, and CI status. The UI evidence section s…
Linked Issues check Passed [#3207] requires fixing the flaky test dialogs::tests::select_by_attributes_values_list_says_why_a_wildcard_value_is_not_added_after_like. If the test waits on a timer, it must wait for completion ins…
Out of Scope Changes check Passed The change summary lists one file, crates/ui-egui/src/dialogs.rs, with 15 added and 9 removed lines. The change modifies only the focused test's frame-stepping logic and adds a supporting helper. Both…
Full details: Title check

Explanation

The title names the main change: the Select By Attributes wildcard test is made stable. The raw summary confirms the test now waits for the Values menu item before clicking it, which matches the title's intent. The title is specific and concise.

Full details: Description check

Explanation

The description follows the template. It has a Summary that explains the flaky failure and the fix. It has a Testing section with the focused command, results, and CI status. The UI evidence section states 'No visible UI change.' as the template allows. The Related issue section cites #3207. The description is complete and specific.

Full details: Linked Issues check

Explanation

[#3207] requires fixing the flaky test dialogs::tests::select_by_attributes_values_list_says_why_a_wildcard_value_is_not_added_after_like. If the test waits on a timer, it must wait for completion instead. The PR changes only this test in crates/ui-egui/src/dialogs.rs (+15/-9, per the change summary). The test now uses a helper that steps the UI and clicks the requested Values menu entry as soon as it appears. The helper stops after ten steps and fails if the entry is still missing. The helper replaces the fixed one-frame advance after each action, and it covers both the 'a_b' and 'plain' values. This removes the fixed frame wait that the flake depended on. Evidence is the PR description and change summary; the diff text could not be read, so the exact code was not inspected. The fixed ten-step cap remains a bound, so a match count that needs more than ten frames would fail deterministically rather than wait for completion. The author reports 100 consecutive passing reruns on macOS. No Ubuntu run is reported.

Full details: Out of Scope Changes check

Explanation

The change summary lists one file, crates/ui-egui/src/dialogs.rs, with 15 added and 9 removed lines. The change modifies only the focused test's frame-stepping logic and adds a supporting helper. Both serve the stated objective of [#3207]. The PR does not change production code, public declarations ('None' in the summary), or unrelated tests. The pre-existing macOS Select All assertion failure in menu::tests::items_name_commands_that_exist is reported as previously observed. It is not part of this PR's changes. The diff text could not be read directly, so this conclusion relies on the change summary and PR description.

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 waits as menus appear
Then taps the value, crisp and clear
a_b is checked, plain goes by
The test steps on, with watchful eye
No fixed-frame guess can make it shy

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: 0877d5b7-c6e8-4f08-8a8e-0579dfb58276
Commits

Reviewing files that changed from the base of the PR and between 30fcf3c and 94dc5db.

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.

break;
}
}
h.get_by_role_and_label(Role::Button, value).click();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When the entry never appears, the poll gives up after ten steps and the get_by_role_and_label below panics with a generic "node not found", which does not say which value was missing. Asserting first names it in the failure:

Suggested change
h.get_by_role_and_label(Role::Button, value).click();
assert!(h.query_by_role_and_label(Role::Button, value).is_some(), "{value} is not listed under Values");
h.get_by_role_and_label(Role::Button, value).click();

Category: quality

@github-actions

Copy link
Copy Markdown
Contributor

Code review

Reviewed the single changed file, crates/ui-egui/src/dialogs.rs, a test-only edit. I could not run the test here (no shell), so this relies on the author's stated local runs.

Bugs

None found. The poll breaks as soon as the value entry appears, and the test checks both outcomes ('a_b' is refused and explained, 'plain' is inserted and clears the note). I confirmed the Values ▾ list is read synchronously in the frame (fieldvalues.rs, Form::list), so the background match count was the only source of the flake, and the new wait is on the right signal. Confidence: high.

Security

None.

Performance

None.

Quality

  • Missing-entry failure message (inline comment posted at dialogs.rs:4910): if the entry never appears, the failure says "node not found" without naming the value. Asserting first fixes that. Confidence: high.
  • Duplicated helper (not posted, minor): pick_value repeats the values/pick closures in the sibling test at dialogs.rs:4726-4733. Sharing one helper would be cleaner. Left for the release quality pass. Confidence: high.

AGENTS.md

No breaks found.

  • The step loop is not a timer wait, so test-hygiene needs no // test-wait: marker.
  • The loop is bounded, and the test covers both outcomes, as the rule requires.
  • The change is test-only, so the cancellation, layering, schema, and wasm rules don't apply.

Twins checked

The change touches only one test. I checked the other Values ▾ tests in the same module (around lines 4718–4995). They rely on the synchronous value read, so they don't share the background-count flake and don't need the same change.

Prior reviews

No prior review threads on this PR, so no earlier concerns were left alone.

Change size

Compared with main (merge base e041087 to PR head 94dc5db).

Measure Value
Files changed 1 (modified 1, added 0, removed 0, renamed 0)
Size before 288.8 KB
Size after 289.1 KB
Total size change +289 B
Path Before After Change
crates/ui-egui/src/dialogs.rs 288.8 KB 289.1 KB +289 B

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs preview

Commit 94dc5db 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 03c5f23 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_says_why_a_wildcard_value_is_not_added_after_like

2 participants