Find a flow's declared inputs and outputs in the global search
/search lists each input and batch output under its qualified message, and picking one opens the flow on the label's id, which the editor now treats like a click on the label: it opens the flow's settings.
This commit is contained in:
@@ -61,6 +61,29 @@ def test_index_reaches_inside_flows_and_dashboards(
|
||||
assert found[("widget", "hall", "temperature")]["kind"] == "stat"
|
||||
|
||||
|
||||
def test_index_lists_a_flows_inputs_and_outputs(
|
||||
client: TestClient, superuser_token_headers: dict[str, str]
|
||||
) -> None:
|
||||
"""Named by the qualified message, which is the label the canvas draws."""
|
||||
client.put(
|
||||
f"{FLOWS}/fit",
|
||||
headers=superuser_token_headers,
|
||||
json={
|
||||
"name": "fit",
|
||||
"mode": "batch",
|
||||
"inputs": [{"spec": {"name": "epochs", "dtype": "int"}}],
|
||||
"outputs": ["accuracy"],
|
||||
},
|
||||
)
|
||||
|
||||
entries = client.get(f"{PREFIX}/", headers=superuser_token_headers).json()
|
||||
found = {(e["category"], e["name"]): e for e in entries if e["parent"] == "fit"}
|
||||
|
||||
assert found[("input", "fit.epochs")]["title"] == "epochs"
|
||||
assert found[("input", "fit.epochs")]["kind"] == "int"
|
||||
assert found[("output", "fit.accuracy")]["title"] == "accuracy"
|
||||
|
||||
|
||||
def test_secrets_are_named_only_to_a_superuser(
|
||||
client: TestClient,
|
||||
superuser_token_headers: dict[str, str],
|
||||
|
||||
Reference in New Issue
Block a user