Frontend addresses flows and dashboards by id: routes /flows/$flowId, /dashboards/$id and /view/$id, query keys, saves, lists, device pickers, search, brain and endpoint links and generated results dashboards go by id, while live values, issues, pauses and message names keep the key; tabs take the title from the document; creating uses POST and opens the issued id; the flow and dashboard panels show key and id with a copy button and a served HTTP or WebSocket node shows its hook URL under the flow id; specs create by POST and ids.spec.ts exercises issued ids
This commit is contained in:
+21
-24
@@ -1,5 +1,5 @@
|
||||
import { expect, test } from "@playwright/test"
|
||||
import { api, apiPage, deleteAll } from "./utils/api"
|
||||
import { api, apiPage, createFlow, deleteAll } from "./utils/api"
|
||||
|
||||
/**
|
||||
* What the runs screen can do to a run, rather than what it can show about one.
|
||||
@@ -28,29 +28,26 @@ test.afterAll(async ({ browser }) => {
|
||||
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
const page = await apiPage(browser)
|
||||
await api(page, `/flows/${flowName}`, {
|
||||
method: "PUT",
|
||||
data: {
|
||||
name: flowName,
|
||||
title: "Runs under test",
|
||||
// `rate` is declared and never passed, which is what puts its declared
|
||||
// value in the Inputs panel below.
|
||||
inputs: [
|
||||
{ spec: { name: "epochs", dtype: "int" }, initial: 2 },
|
||||
{ spec: { name: "rate", dtype: "float" }, initial: 0.5 },
|
||||
],
|
||||
nodes: [
|
||||
{
|
||||
id: "train",
|
||||
type: "python",
|
||||
requires: [{ name: "epochs", dtype: "int" }],
|
||||
provides: [
|
||||
{ name: "loss", dtype: "float", stream: true },
|
||||
{ name: "score", dtype: "float" },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
await createFlow(page, {
|
||||
name: flowName,
|
||||
title: "Runs under test",
|
||||
// `rate` is declared and never passed, which is what puts its declared
|
||||
// value in the Inputs panel below.
|
||||
inputs: [
|
||||
{ spec: { name: "epochs", dtype: "int" }, initial: 2 },
|
||||
{ spec: { name: "rate", dtype: "float" }, initial: 0.5 },
|
||||
],
|
||||
nodes: [
|
||||
{
|
||||
id: "train",
|
||||
type: "python",
|
||||
requires: [{ name: "epochs", dtype: "int" }],
|
||||
provides: [
|
||||
{ name: "loss", dtype: "float", stream: true },
|
||||
{ name: "score", dtype: "float" },
|
||||
],
|
||||
},
|
||||
],
|
||||
})
|
||||
await api(page, `/flows/${flowName}/nodes/train/source`, {
|
||||
method: "PUT",
|
||||
|
||||
Reference in New Issue
Block a user