Skip to content

Flaky test: test_tooltip_demo[app-express.py-webkit] — tooltip body not found after update #2427

Description

@schloerke

Occurrence

Test

tests/playwright/ai_generated_apps/core_express/update_tooltip/test_update_tooltip_core_express.py::test_tooltip_demo[app-express.py-webkit]

Only the webkit + Express parameterization failed; the other browsers and the Core app variant passed in the same run.

Error

>       playwright_expect(self.get_loc_overlay_body(timeout=timeout)).to_have_text(
            value, timeout=timeout
        )
E       AssertionError: Locator expected to have text 'Tooltip updated 2 times!'
E       Actual value: None
E       Error: element(s) not found
E       Call log:
E         - Expect "to_have_text" with timeout 5000ms
E         - waiting for locator("#None.tooltip > div.tooltip-inner")

.venv/lib/python3.14/site-packages/shiny/playwright/controller/_overlay.py:112: AssertionError

Aria snapshot at failure time shows the page rendered and the trigger buttons present, but no tooltip overlay in the DOM:

- heading "Update Tooltip Demo" [level=2]
- text: Tooltip Demo
- button " Show tooltip"
- button " Close tooltip"
- button " Update tooltip"
- separator
- button " Hover over me!"

Notes

Two things stand out in the call log and may be worth a look beyond the timing flake itself:

  • The locator is #None.tooltip > div.tooltip-inner — the None suggests the overlay controller resolved a placeholder id rather than the real tooltip id, so the selector may be unable to match even when the overlay is present. Worth confirming whether _overlay.py's get_loc_overlay_body() is constructing the selector correctly for this app.
  • The assertion waits for the updated text ("Tooltip updated 2 times!") with the overlay expected to already be open; on webkit the show/update sequence may race, leaving the overlay closed at assertion time.

Metadata

Metadata

Assignees

Labels

ai-generated-issueIndicates that the issue body was generated by automation.flaky testA test that failed in CI but passed on rerun; tracked for recurrence

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions