mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add snapshot test.
This commit is contained in:
22
tests/snapshot_tests/snapshot_apps/input_suggestions.py
Normal file
22
tests/snapshot_tests/snapshot_apps/input_suggestions.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.widgets import Input
|
||||
|
||||
|
||||
fruits = ["apple", "pear", "mango", "peach", "strawberry", "blueberry", "banana"]
|
||||
|
||||
|
||||
class FruitsApp(App[None]):
|
||||
CSS = """
|
||||
Input > .input--suggestion {
|
||||
color: red;
|
||||
text-style: italic;
|
||||
}
|
||||
"""
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Input("straw", suggestions=fruits)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = FruitsApp()
|
||||
app.run()
|
||||
Reference in New Issue
Block a user