Skip to content

Commit

Permalink
fix test to change datepicker date
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmateos committed Jun 6, 2024
1 parent a120852 commit efe0ab6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.dhis2.usescases.teidashboard.robot

import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.hasAnyAncestor
import androidx.compose.ui.test.hasAnySibling
import androidx.compose.ui.test.hasTestTag
import androidx.compose.ui.test.hasText
Expand Down Expand Up @@ -122,7 +123,9 @@ class EventRobot(val composeTestRule: ComposeTestRule) : BaseRobot() {
substring = true,
useUnmergedTree = true,
).performClick()
composeTestRule.onNodeWithText(currentDate).performTextReplacement(date)
composeTestRule.onNode(
hasText(currentDate) and hasAnyAncestor(isDialog())
).performTextReplacement(date)
}

fun typeOnDateParameter(dateValue: String) {
Expand Down

0 comments on commit efe0ab6

Please sign in to comment.