feat(scada): add manual monitoring timeline
This commit is contained in:
@@ -33,6 +33,16 @@ describe("DateTimeField", () => {
|
||||
expect(onChange).toHaveBeenCalledWith("2024-02-29T09:30");
|
||||
});
|
||||
|
||||
it("limits minute choices to the configured step", async () => {
|
||||
const user = userEvent.setup();
|
||||
render(<DateTimeField label="演示开始时间" value="2024-02-28T09:25" onChange={vi.fn()} minuteStep={5} />);
|
||||
|
||||
await user.click(screen.getByRole("button", { name: "演示开始时间" }));
|
||||
await user.click(screen.getByRole("combobox", { name: "分钟" }));
|
||||
expect(screen.getByRole("option", { name: "25" })).toBeVisible();
|
||||
expect(screen.queryByRole("option", { name: "26" })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it.each(["2025-02-29T12:00", "2024-04-31T12:00", "2024-02-29T12:00:30"])(
|
||||
"rejects invalid or unexpected source value %s",
|
||||
async (value) => {
|
||||
|
||||
Reference in New Issue
Block a user