From 9480fbbe7c414ce24825fe2806da262a5942be6c Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Fri, 3 Jan 2025 10:48:27 -0800 Subject: [PATCH] fixes js tests --- assets/components/FuzzySearchModal.spec.ts | 42 +++++++++++++++++-- .../components/LogViewer/EventSource.spec.ts | 14 ++++++- 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/assets/components/FuzzySearchModal.spec.ts b/assets/components/FuzzySearchModal.spec.ts index cb69443f2aac..80b90e903510 100644 --- a/assets/components/FuzzySearchModal.spec.ts +++ b/assets/components/FuzzySearchModal.spec.ts @@ -31,9 +31,45 @@ function createFuzzySearchModal() { initialState: { container: { containers: [ - new Container("123", new Date(), "image", "test", "command", "host", {}, "running", []), - new Container("345", new Date(), "image", "foo bar", "command", "host", {}, "running", []), - new Container("567", new Date(), "image", "baz", "command", "host", {}, "running", []), + new Container( + "123", + new Date(), + new Date(), + new Date(), + "image", + "test", + "command", + "host", + {}, + "running", + [], + ), + new Container( + "345", + new Date(), + new Date(), + new Date(), + "image", + "foo bar", + "command", + "host", + {}, + "running", + [], + ), + new Container( + "567", + new Date(), + new Date(), + new Date(), + "image", + "baz", + "command", + "host", + {}, + "running", + [], + ), ], }, }, diff --git a/assets/components/LogViewer/EventSource.spec.ts b/assets/components/LogViewer/EventSource.spec.ts index 9a1d9d24779e..47d4b31b1125 100644 --- a/assets/components/LogViewer/EventSource.spec.ts +++ b/assets/components/LogViewer/EventSource.spec.ts @@ -94,7 +94,19 @@ describe("", () => { }, props: { streamSource: useContainerStream, - entity: new Container("abc", new Date(), "image", "name", "command", "localhost", {}, "created", []), + entity: new Container( + "abc", + new Date(), // created + new Date(), // started + new Date(), // finished + "image", + "name", + "command", + "localhost", + {}, + "created", + [], + ), }, }); }