fix(kanban): scroll workspace row before instrumented clicks (#1137)
This commit is contained in:
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
|
package com.m57.hermescontrol.ui.kanban
|
||||||
|
|
||||||
import androidx.compose.ui.test.assertIsDisplayed
|
import androidx.compose.ui.test.assertIsDisplayed
|
||||||
|
import androidx.compose.ui.test.assertIsSelected
|
||||||
import androidx.compose.ui.test.junit4.createComposeRule
|
import androidx.compose.ui.test.junit4.createComposeRule
|
||||||
import androidx.compose.ui.test.onNodeWithTag
|
import androidx.compose.ui.test.onNodeWithTag
|
||||||
import androidx.compose.ui.test.onNodeWithText
|
import androidx.compose.ui.test.onNodeWithText
|
||||||
@@ -74,10 +75,13 @@ class KanbanScreenTest {
|
|||||||
composeTestRule.onNodeWithTag("kanban_workspace_path").assertDoesNotExist()
|
composeTestRule.onNodeWithTag("kanban_workspace_path").assertDoesNotExist()
|
||||||
|
|
||||||
// Select Worktree
|
// Select Worktree
|
||||||
|
composeTestRule.onNodeWithTag("kanban_workspace_kinds").performScrollTo()
|
||||||
composeTestRule.onNodeWithTag("kanban_workspace_kind_worktree").performClick()
|
composeTestRule.onNodeWithTag("kanban_workspace_kind_worktree").performClick()
|
||||||
|
composeTestRule.onNodeWithTag("kanban_workspace_kind_worktree").assertIsSelected()
|
||||||
composeTestRule.onNodeWithTag("kanban_workspace_path").performScrollTo().assertIsDisplayed()
|
composeTestRule.onNodeWithTag("kanban_workspace_path").performScrollTo().assertIsDisplayed()
|
||||||
|
|
||||||
// Select Scratch again
|
// Select Scratch again
|
||||||
|
composeTestRule.onNodeWithTag("kanban_workspace_kinds").performScrollTo()
|
||||||
composeTestRule.onNodeWithTag("kanban_workspace_kind_scratch").performClick()
|
composeTestRule.onNodeWithTag("kanban_workspace_kind_scratch").performClick()
|
||||||
composeTestRule.onNodeWithTag("kanban_workspace_path").assertDoesNotExist()
|
composeTestRule.onNodeWithTag("kanban_workspace_path").assertDoesNotExist()
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -414,7 +414,11 @@ fun KanbanCreateTaskDialog(
|
|||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
Row(
|
Row(
|
||||||
horizontalArrangement = Arrangement.spacedBy(6.dp),
|
horizontalArrangement = Arrangement.spacedBy(6.dp),
|
||||||
modifier = Modifier.fillMaxWidth().horizontalScroll(rememberScrollState()),
|
modifier =
|
||||||
|
Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.horizontalScroll(rememberScrollState())
|
||||||
|
.testTag("kanban_workspace_kinds"),
|
||||||
) {
|
) {
|
||||||
listOf(
|
listOf(
|
||||||
"scratch" to stringResource(R.string.kanban_workspace_scratch),
|
"scratch" to stringResource(R.string.kanban_workspace_scratch),
|
||||||
|
|||||||
Reference in new issue
Block a user