These tests are designed to give 100% coverage to the App._on_remove method,
which is the heart of the widget removal system. This is done in
anticipation to some reworking as part of #1094.
Note that, for the moment, there's a bit of a hack in here. These tests need
the pilot. The pilot would need that we await changes to the DOM. Removing
things from the DOM changes the DOM. Remove can't be awaited (see above
change that's coming). So... until such a time as we can await a remove, we
go with a simple await of asyncio.sleep to get things started.
Once #1094 has been done these tests should all still work fine *and* we
should be able to await the removes rather than use the sleeps.
Because some changes are going to be made to the way that removal of widgets
happens, and because this will affect the linkage between parents and
children, and because we don't want the current way of working to change...
extend to the tests to be sure that when an unmount happens a widget has no
children any more, but still knows about its parent.
This was waiting for the update to query_one that would raise an exception
if the result had more than one match. That's in Textual now so we can
finally add this test.
* Fix containers not being focusable
* Fix tests to allow for focusable containers
* Add test for non-focusable container with focusable children
* Fix a typo in a test
* Support multiple CSS paths
* Update a type to match docstring
* Ensure the demo app still works
* Use absolute paths in tests to (hopefully) appease Windows
* Notes about CSS changes in guide/docstrings, small grammar/typos fixes
* Move snapshot apps into snapshot_tests dir, improve messaging in snapshot output, add test for multiple css files interacting with classvar CSS
* Ensure consistent snapshot naming cross-platform
* Use rpartition instead of partition in import_app
* Fix handling of import_app when colon in arg
* Support paths containing Windows drive names in import_app
* Add note on new relative paths in snap_compare
* Update docs/guide/CSS.md
Co-authored-by: Will McGugan <willmcgugan@gmail.com>
* Fix formatting
* Update CHANGELOG to mention CSS_PATH supporting a list
Co-authored-by: Will McGugan <willmcgugan@gmail.com>