Skip to content

Commit

Permalink
try to work around Compose test's issue: AssertionError: No node foun…
Browse files Browse the repository at this point in the history
…d that matches TestTag = 'EnvironmentDropdown/DropdownItem/*' in scrollable container
  • Loading branch information
sunny-chung committed Nov 6, 2024
1 parent 1bb652a commit 05b4426
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,9 @@ fun SemanticsNodeInteraction.performClickWithRetry(host: ComposeUiTest): Semanti
fun SemanticsNodeInteraction.assertIsDisplayedWithRetry(host: ComposeUiTest): SemanticsNodeInteraction {
while (true) {
try {
assertIsDisplayed()
host.runOnUiThread {
assertIsDisplayed()
}
return this
} catch (e: IllegalArgumentException) {
host.waitForIdle()
Expand Down

0 comments on commit 05b4426

Please sign in to comment.