From 2963dd712b16123bff396ef932bcc8da102b960f Mon Sep 17 00:00:00 2001 From: kirillk Date: Wed, 27 May 2026 15:54:02 -0400 Subject: [PATCH] fix(jetbrains): fix test compilation after ViewFactory and SessionUiStyle changes --- .../ai/kilocode/client/session/views/PlanExitViewTest.kt | 4 ++-- .../kilocode/client/session/views/QuestionResultViewTest.kt | 6 +++--- .../src/test/kotlin/ai/kilocode/client/ui/UiStyleTest.kt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/views/PlanExitViewTest.kt b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/views/PlanExitViewTest.kt index 69e69bdf979..cc7a2811cf2 100644 --- a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/views/PlanExitViewTest.kt +++ b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/views/PlanExitViewTest.kt @@ -19,7 +19,7 @@ class PlanExitViewTest : BasePlatformTestCase() { fun `test view factory replaces running tool with plan exit view when completed`() { val running = tool(ToolExecState.RUNNING) - val existing = ViewFactory.create(running) {} + val existing = ViewFactory.create(running, {}) {} assertTrue(existing is ToolView) val done = tool(ToolExecState.COMPLETED).apply { @@ -27,7 +27,7 @@ class PlanExitViewTest : BasePlatformTestCase() { } assertTrue(ViewFactory.shouldReplace(existing, done)) - assertTrue(ViewFactory.create(done) {} is PlanExitView) + assertTrue(ViewFactory.create(done, {}) {} is PlanExitView) } fun `test clicking plan link opens href`() { diff --git a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/views/QuestionResultViewTest.kt b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/views/QuestionResultViewTest.kt index 34b6a4c4d3e..1d2c8a8e705 100644 --- a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/views/QuestionResultViewTest.kt +++ b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/views/QuestionResultViewTest.kt @@ -153,7 +153,7 @@ class QuestionResultViewTest : BasePlatformTestCase() { input = mapOf("questions" to """[{"question":"Q1"}]"""), metadata = mapOf("answers" to """[["A1"]]"""), ) - val view = ViewFactory.create(tool) {} + val view = ViewFactory.create(tool, {}) {} assertTrue(view is QuestionResultView) } @@ -163,14 +163,14 @@ class QuestionResultViewTest : BasePlatformTestCase() { input = emptyMap(), metadata = emptyMap(), ) - val view = ViewFactory.create(tool) {} + val view = ViewFactory.create(tool, {}) {} assertTrue(view is ToolView) } fun `test view factory falls back to tool view for running question`() { val tool = runningTool("question") - val view = ViewFactory.create(tool) {} + val view = ViewFactory.create(tool, {}) {} assertTrue(view is ToolView) } diff --git a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/ui/UiStyleTest.kt b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/ui/UiStyleTest.kt index 73269d10499..085fca6a3d9 100644 --- a/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/ui/UiStyleTest.kt +++ b/packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/ui/UiStyleTest.kt @@ -29,7 +29,7 @@ class UiStyleTest : BasePlatformTestCase() { fun `test hover blends from panel toward border`() { val panel = Color(0, 0, 0) val border = UiStyle.Colors.contrast(panel, SessionUiStyle.View.BORDER_DELTA) - val hover = UiStyle.Colors.blend(panel, border, SessionUiStyle.View.HOVER_ALPHA) + val hover = UiStyle.Colors.blend(panel, border, SessionUiStyle.View.HOVER_FILL_ALPHA) assertTrue(hover.red > panel.red) assertTrue(hover.red < border.red)