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:
@@ -22,6 +22,7 @@ test.beforeAll(async ({ browser }) => {
|
||||
name: flowName,
|
||||
title: "Searchable flow",
|
||||
nodes: [{ id: "findme", type: "python", title: "Find me" }],
|
||||
inputs: [{ spec: { name: "findme_input", dtype: "float" } }],
|
||||
},
|
||||
})
|
||||
await page.close()
|
||||
@@ -41,6 +42,21 @@ test("finds a node by name and opens its flow on it", async ({ page }) => {
|
||||
await expect(page).toHaveURL(new RegExp(`/flows/${flowName}\\?node=findme$`))
|
||||
})
|
||||
|
||||
test("finds a flow input and opens the settings declaring it", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/")
|
||||
await page.getByRole("button", { name: "Search", exact: true }).click()
|
||||
|
||||
await page.getByTestId("global-search-input").fill("findme_input")
|
||||
await page.getByRole("option", { name: /findme_input/ }).click()
|
||||
|
||||
await expect(page).toHaveURL(
|
||||
new RegExp(`/flows/${flowName}\\?node=input%3A${flowName}\\.findme_input$`),
|
||||
)
|
||||
await expect(page.getByTestId("flow-panel")).toBeVisible()
|
||||
})
|
||||
|
||||
test("opens on the keyboard from anywhere", async ({ page }) => {
|
||||
await page.goto("/dashboards")
|
||||
// The binding lives in the sidebar, so wait for it to be there to press at.
|
||||
|
||||
Reference in New Issue
Block a user