Add snapshot test.

This commit is contained in:
Rodrigo Girão Serrão
2023-05-18 14:26:32 +01:00
parent 03a43521dd
commit bfdaf02f66
5 changed files with 190 additions and 2 deletions

View 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()