KakaoCup / Compose

Nice and simple DSL for Espresso Compose UI testing in Kotlin
https://kakaocup.github.io/Compose/
Apache License 2.0
139 stars 13 forks source link

Enhancement - add description parameter for NodeAssertions #45

Open EvgeniyVirin opened 1 year ago

EvgeniyVirin commented 1 year ago

Hello. All assertions in the "NodeAssertions" interface are use the "check()" function, which has a "description" parameter. But this parameter has not been added to the assert functions in interface "NodeAssertions"

I would like to modify assert functions, for example:

fun assertTextContains(
        assertDescription: String? = null,
        value: String,
        substring: Boolean = false,
        ignoreCase: Boolean = false
    ) {
        delegate.check(description = assertDescription, ComposeBaseAssertionType.ASSERT_TEXT_CONTAINS) { assertTextContains(value, substring, ignoreCase) }
    }

Снимок экрана 2023-03-31 в 20 26 34