mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
test fixes
This commit is contained in:
@@ -462,9 +462,6 @@ class App(Generic[ReturnType], DOMNode):
|
||||
SUSPENDED_SCREEN_CLASS: ClassVar[str] = ""
|
||||
"""Class to apply to suspended screens, or empty string for no class."""
|
||||
|
||||
HOVER_EFFECTS_SCROLL_PAUSE: ClassVar[float] = 0.02
|
||||
"""Seconds to pause hover effects for when scrolling."""
|
||||
|
||||
_PSEUDO_CLASSES: ClassVar[dict[str, Callable[[App[Any]], bool]]] = {
|
||||
"focus": lambda app: app.app_focus,
|
||||
"blur": lambda app: not app.app_focus,
|
||||
@@ -2824,8 +2821,6 @@ class App(Generic[ReturnType], DOMNode):
|
||||
Args:
|
||||
widget: Widget under mouse, or None for no widgets.
|
||||
"""
|
||||
if widget is not None and widget.is_scrolling:
|
||||
return
|
||||
if widget is None:
|
||||
if self.mouse_over is not None:
|
||||
try:
|
||||
|
||||
@@ -72,10 +72,10 @@ async def test_lists_of_selectors_in_nested_css() -> None:
|
||||
class DeclarationAfterNestedApp(App[None]):
|
||||
CSS = """
|
||||
Screen {
|
||||
background: green;
|
||||
Label {
|
||||
background: red;
|
||||
}
|
||||
background: green;
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ from textual.widgets import Checkbox, Footer
|
||||
|
||||
class ScrollOffByOne(App):
|
||||
AUTO_FOCUS = None
|
||||
HOVER_EFFECTS_SCROLL_PAUSE = 0.0
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
for number in range(1, 100):
|
||||
|
||||
@@ -6,7 +6,6 @@ class ScrollOffByOne(App):
|
||||
"""Scroll to item 50."""
|
||||
|
||||
AUTO_FOCUS = None
|
||||
HOVER_EFFECTS_SCROLL_PAUSE = 0
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
for number in range(1, 100):
|
||||
|
||||
@@ -39,10 +39,11 @@ async def test_lazy_reveal():
|
||||
async with app.run_test() as pilot:
|
||||
# No #foo on initial mount
|
||||
|
||||
# Only first child should be visible initially
|
||||
# Only first child should be available initially
|
||||
assert app.query_one("#foo").display
|
||||
assert not app.query_one("#bar").display
|
||||
assert not app.query_one("#baz").display
|
||||
# Next two aren't mounted yet
|
||||
assert not app.query("#bar")
|
||||
assert not app.query("#baz")
|
||||
|
||||
# All children should be visible after a pause
|
||||
await pilot.pause()
|
||||
|
||||
Reference in New Issue
Block a user