Slider reading in a tile: a line under the value in every look, row and fader; Beside it on every dashboard; tile geometry in the docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
84071ee106
commit
a6a1f2a2c3
@@ -249,6 +249,21 @@ test.beforeAll(async ({ browser }) => {
|
||||
unit: " kW",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "against",
|
||||
type: "slider",
|
||||
title: "Against",
|
||||
layout: { lg: { x: 6, y: 0, w: 4, h: 2 } },
|
||||
config: {
|
||||
target: w("setpoint"),
|
||||
dtype: "float",
|
||||
min: 0,
|
||||
max: 100,
|
||||
step: 0.5,
|
||||
unit: " kW",
|
||||
reading: { message: w("level"), dtype: "float", label: "Level" },
|
||||
},
|
||||
},
|
||||
]
|
||||
const stacked = await (
|
||||
await api(page, `/dashboards/${stackName}`, { method: "PUT", data: stack })
|
||||
@@ -409,6 +424,16 @@ test("rows are drawn in the order they were configured", async ({ page }) => {
|
||||
await expect(rows.nth(2)).toContainText(/grid/i)
|
||||
})
|
||||
|
||||
test("a slider writes what it sets against under its value", async ({
|
||||
page,
|
||||
}) => {
|
||||
await openPanel(page, stackName)
|
||||
// In the slider's unit and to its step's decimals, not the reading's own.
|
||||
await expect(page.getByTestId("slider-reading")).toHaveText(
|
||||
/^Level\s*80\.0\s*kW$/,
|
||||
)
|
||||
})
|
||||
|
||||
test("a reading is written to its own precision while it is moving", async ({
|
||||
page,
|
||||
}) => {
|
||||
|
||||
Reference in New Issue
Block a user