mirror of
https://github.com/rio-labs/rio.git
synced 2026-02-11 08:10:29 -06:00
added test
This commit is contained in:
@@ -4,7 +4,7 @@ import typing as t
|
||||
import pytest
|
||||
|
||||
import rio
|
||||
from rio.testing import BrowserClient
|
||||
from rio.testing import BrowserClient, DummyClient
|
||||
|
||||
|
||||
class DialogOpener(rio.Component):
|
||||
@@ -89,3 +89,11 @@ async def test_esc_closes_dialog():
|
||||
|
||||
opener = test_client.get_component(DialogOpener)
|
||||
assert opener.dialog_closed
|
||||
|
||||
|
||||
async def test_dialog_content_components_visible():
|
||||
async with DummyClient(
|
||||
lambda: DialogOpener(lambda: rio.Text("foo"))
|
||||
) as test_client:
|
||||
await asyncio.sleep(0.1)
|
||||
assert test_client.get_component(rio.Text)
|
||||
|
||||
Reference in New Issue
Block a user