Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions tests/test_solara_viz_updated.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,24 @@ def Test(user_params):
assert slider_int.max is None
assert slider_int.step is None

def test_input_text_field(self):
"""Test that "InputText" type creates a vw.TextField."""

@solara.component
def Test(user_params):
UserInputs(user_params)

options = {"type": "InputText", "value": "JohnDoe", "label": "Agent Name"}

user_params = {"agent_name": options}

_, rc = solara.render(Test(user_params), handle_error=False)

textfield = rc.find(vw.TextField).widget

assert textfield.v_model == options["value"]
assert textfield.label == options["label"]


def test_call_space_drawer(mocker):
"""Test the call to space drawer."""
Expand Down