mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 23:34:31 +00:00
test: remove redundant datetimepicker passthrough case
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
|||||||
messageAction,
|
messageAction,
|
||||||
uriAction,
|
uriAction,
|
||||||
postbackAction,
|
postbackAction,
|
||||||
datetimePickerAction,
|
|
||||||
} from "./template-messages.js";
|
} from "./template-messages.js";
|
||||||
|
|
||||||
describe("messageAction", () => {
|
describe("messageAction", () => {
|
||||||
@@ -59,22 +58,6 @@ describe("postbackAction", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("datetimePickerAction", () => {
|
|
||||||
it("includes min/max/initial when provided", () => {
|
|
||||||
const action = datetimePickerAction("Pick", "data", "datetime", {
|
|
||||||
initial: "2024-01-01T12:00",
|
|
||||||
min: "2024-01-01T00:00",
|
|
||||||
max: "2024-12-31T23:59",
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(action.label).toBe("Pick");
|
|
||||||
expect((action as { mode: string }).mode).toBe("datetime");
|
|
||||||
expect((action as { initial: string }).initial).toBe("2024-01-01T12:00");
|
|
||||||
expect((action as { min: string }).min).toBe("2024-01-01T00:00");
|
|
||||||
expect((action as { max: string }).max).toBe("2024-12-31T23:59");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe("createConfirmTemplate", () => {
|
describe("createConfirmTemplate", () => {
|
||||||
it("truncates text to 240 characters", () => {
|
it("truncates text to 240 characters", () => {
|
||||||
const longText = "x".repeat(300);
|
const longText = "x".repeat(300);
|
||||||
|
|||||||
Reference in New Issue
Block a user