-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refresh SemanticsNodeInteraction provider state (#86)
- Loading branch information
1 parent
41b55a7
commit b483429
Showing
9 changed files
with
232 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
sample-app/src/androidTest/java/com/atiurin/sampleapp/tests/compose/SampleClassTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.atiurin.sampleapp.tests.compose | ||
|
||
import androidx.compose.ui.test.hasTestTag | ||
import com.atiurin.sampleapp.activity.ComposeElementsActivity | ||
import com.atiurin.sampleapp.tests.BaseTest | ||
import com.atiurin.ultron.core.compose.createUltronComposeRule | ||
import com.atiurin.ultron.extensions.assertIsDisplayed | ||
import com.atiurin.ultron.extensions.withName | ||
import com.atiurin.ultron.extensions.withTimeout | ||
import com.atiurin.ultron.page.Page | ||
import org.junit.Rule | ||
import org.junit.Test | ||
|
||
class SampleClassTest : BaseTest() { | ||
@get:Rule | ||
val composeRuleBase = createUltronComposeRule<ComposeElementsActivity>() | ||
|
||
@Test | ||
fun test() { | ||
SomePage{ | ||
elementWithName.assertIsDisplayed() | ||
elementWithTimeout.assertIsDisplayed() | ||
elementMatcher.assertIsDisplayed() | ||
} | ||
} | ||
|
||
@Test | ||
fun test2() { | ||
SomePage{ | ||
elementWithName.assertIsDisplayed() | ||
elementWithTimeout.assertIsDisplayed() | ||
elementMatcher.assertIsDisplayed() | ||
} | ||
} | ||
} | ||
|
||
object SomePage : Page<SomePage>() { | ||
val elementWithName = hasTestTag("statusText").withName("sample element name") | ||
val elementWithTimeout = hasTestTag("statusText").withTimeout(4000) | ||
val elementMatcher = hasTestTag("statusText") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
.../androidMain/kotlin/com/atiurin/ultron/core/compose/config/UltronComposeConfig.android.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.atiurin.ultron.core.compose.config | ||
|
||
import com.atiurin.ultron.log.ULogger | ||
import com.atiurin.ultron.log.UltronLogcatLogger | ||
|
||
actual fun getPlatformLoggers(): List<ULogger> { | ||
return listOf(UltronLogcatLogger()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.