fix(kanban): scroll workspace row before instrumented clicks (#1137)

This commit is contained in:
M57 committed 2026-09-17 00:54:53 +03:00
1 parent 6f076a79d3
commit 1bb91bce65
2 files changed
+9 -1

No files matched your search

@@ -1,6 +1,7 @@
package com.m57.hermescontrol.ui.kanban
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.assertIsSelected
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.onNodeWithText
@@ -74,10 +75,13 @@ class KanbanScreenTest {
composeTestRule.onNodeWithTag("kanban_workspace_path").assertDoesNotExist()
// Select Worktree
composeTestRule.onNodeWithTag("kanban_workspace_kinds").performScrollTo()
composeTestRule.onNodeWithTag("kanban_workspace_kind_worktree").performClick()
composeTestRule.onNodeWithTag("kanban_workspace_kind_worktree").assertIsSelected()
composeTestRule.onNodeWithTag("kanban_workspace_path").performScrollTo().assertIsDisplayed()
// Select Scratch again
composeTestRule.onNodeWithTag("kanban_workspace_kinds").performScrollTo()
composeTestRule.onNodeWithTag("kanban_workspace_kind_scratch").performClick()
composeTestRule.onNodeWithTag("kanban_workspace_path").assertDoesNotExist()
}
@@ -414,7 +414,11 @@ fun KanbanCreateTaskDialog(
Spacer(modifier = Modifier.height(4.dp))
Row(
horizontalArrangement = Arrangement.spacedBy(6.dp),
modifier = Modifier.fillMaxWidth().horizontalScroll(rememberScrollState()),
modifier =
Modifier
.fillMaxWidth()
.horizontalScroll(rememberScrollState())
.testTag("kanban_workspace_kinds"),
) {
listOf(
"scratch" to stringResource(R.string.kanban_workspace_scratch),