textual-paint/tests
Isaiah Odhner 40220e22d2 Fix flaky CharacterSelectorDialogWindow test (hopefully)
This should fix this failure:

    FAILED tests/test_snapshots.py::test_paint_character_picker_dialog[dark_unicode] - textual.css.query.NoMatches: No nodes match <DOMQuery query='CharacterSelectorDialogWindow'>

I noticed this first in a Windows VM, and am now seeing it in Ubuntu,
so it might have to do with the test running slowly.
This was back on textual 0.28.0 by the way; it doesn't have to do with
the recent updates (as far as I know; at least, not entirely.)

I've never had it reproduce when running in isolation with
    pytest tests/test_snapshots.py::test_paint_character_picker_dialog

I tried adding a delay right before the query, and that DIDN'T work,
I got the failure at least once with that in place, so I think it was
failing to detect a double click, rather than querying while the window
was in the process of opening, and so I decided to try increasing the
double click threshold. The click() method of pilot has a cumulative
artificial delay of 0.3s, so two clicks is at least 0.6s and it's not
hard to imagine the event processing pushing that over 0.8s.
I actually created the `DOUBLE_CLICK_TIME` to allow overriding it in
tests, and I'm not sure if this actually works to override it.
2023-09-18 02:00:58 -04:00
..
__snapshots__ Update textual to 0.33.0 2023-09-18 01:08:22 -04:00
__init__.py WIP: set up snapshot testing 2023-09-07 15:19:10 -04:00
conftest.py Satisfy the type checker 2023-09-16 23:31:08 -04:00
extract_ambr.py Create script for extracting SVGs from ambr files 2023-09-08 14:44:56 -04:00
merge_ambr.py Create script for merging ambr files 2023-09-08 11:28:14 -04:00
pilot_helpers.py Satisfy the type checker 2023-09-16 23:31:08 -04:00
pilot_recorder.py Silence type checker warnings (reportOptionalMemberAccess) 2023-09-16 23:31:08 -04:00
test_behavior.py Make palette state local to the app instance 2023-09-14 02:31:49 -04:00
test_encoding.py Test file drag-and-drop handling 2023-09-14 02:03:52 -04:00
test_snapshots.py Fix flaky CharacterSelectorDialogWindow test (hopefully) 2023-09-18 02:00:58 -04:00