Skip to content

Commit

Permalink
test: test if props can be updated directly after creation
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Jan 16, 2025
1 parent 2406e8b commit 233084b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/ui/basics_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def on_click(event_data):
page_session.locator(".test-button >> .test-html").wait_for()


def test_children_update_after_create(solara_test, page_session: playwright.sync_api.Page):
def test_update_children_after_create(solara_test, page_session: playwright.sync_api.Page):
b = ipyreact.Widget(
_type="button",
children=["Initial"],
Expand All @@ -70,3 +70,15 @@ def test_children_update_after_create(solara_test, page_session: playwright.sync

display(b)
page_session.locator(".test-button >> text=Updated").wait_for()


def test_update_props_after_create(solara_test, page_session: playwright.sync_api.Page):
b = ipyreact.Widget(
_type="button",
children=["Button"],
props={"class": "test-button-initial"},
)
b.props = {"class": "test-button-updated"}

display(b)
page_session.locator(".test-button-updated >> text=Button").wait_for()

0 comments on commit 233084b

Please sign in to comment.