Skip to content

Commit 233084b

Browse files
test: test if props can be updated directly after creation
1 parent 2406e8b commit 233084b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/ui/basics_test.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def on_click(event_data):
6060
page_session.locator(".test-button >> .test-html").wait_for()
6161

6262

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

7171
display(b)
7272
page_session.locator(".test-button >> text=Updated").wait_for()
73+
74+
75+
def test_update_props_after_create(solara_test, page_session: playwright.sync_api.Page):
76+
b = ipyreact.Widget(
77+
_type="button",
78+
children=["Button"],
79+
props={"class": "test-button-initial"},
80+
)
81+
b.props = {"class": "test-button-updated"}
82+
83+
display(b)
84+
page_session.locator(".test-button-updated >> text=Button").wait_for()

0 commit comments

Comments
 (0)