Skip to content

Commit

Permalink
Merge pull request #112 from yml-org/bug/CM-1489
Browse files Browse the repository at this point in the history
[bug/CM-1492]: Updated node info and fixed the ui test issue.
  • Loading branch information
dkk009 authored Jun 26, 2023
2 parents 9d13d10 + d2ee462 commit a045de3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.test.assertCountEquals
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.hasAnyChild
import androidx.compose.ui.test.hasClickAction
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onAllNodesWithTag
import androidx.compose.ui.test.onChildren
import androidx.compose.ui.test.onFirst
import androidx.compose.ui.test.onNodeWithTag
Expand Down Expand Up @@ -130,9 +129,7 @@ class StackedBarChartTest {
@Test
fun assertIfStackedBarClicked() {
startStackedBarChart()

composeTestRule.onNode(hasAnyChild(hasClickAction()), useUnmergedTree = true)
.onChildren()
composeTestRule.onAllNodesWithTag("chart_canvas", useUnmergedTree = true)
.onFirst()
.performClick()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.drawscope.Stroke
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onAllNodesWithTag
import androidx.compose.ui.test.onFirst
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.unit.dp
import co.yml.charts.axis.AxisData
Expand Down Expand Up @@ -102,7 +104,9 @@ class WaveChartTest {
composeTestRule.setContent {
WaveChart(modifier = Modifier, waveChartData = data)
}
composeTestRule.onNodeWithTag("scrollable_container").assertIsDisplayed()
composeTestRule.onAllNodesWithTag(testTag = "scrollable_container", useUnmergedTree = true)
.onFirst()
.assertIsDisplayed()
}

@Test
Expand Down

0 comments on commit a045de3

Please sign in to comment.