mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
fix(jetbrains): fix test compilation after ViewFactory and SessionUiStyle changes
This commit is contained in:
+2
-2
@@ -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`() {
|
||||
|
||||
+3
-3
@@ -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)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user