75 lines
No EOL
2.4 KiB
Kotlin
75 lines
No EOL
2.4 KiB
Kotlin
package com.tangem.screens
|
|
|
|
import androidx.compose.ui.test.SemanticsNodeInteractionsProvider
|
|
import com.tangem.common.BaseTestCase
|
|
import com.tangem.core.ui.R
|
|
import com.tangem.core.ui.test.BaseButtonTestTags
|
|
import com.tangem.core.ui.test.BaseDialogTestTags
|
|
import io.github.kakaocup.compose.node.element.ComposeScreen
|
|
import io.github.kakaocup.compose.node.element.ComposeScreen.Companion.onComposeScreen
|
|
import io.github.kakaocup.compose.node.element.KNode
|
|
import io.github.kakaocup.kakao.common.utilities.getResourceString
|
|
|
|
class DialogPageObject(semanticsProvider: SemanticsNodeInteractionsProvider) :
|
|
ComposeScreen<DialogPageObject>(semanticsProvider = semanticsProvider) {
|
|
|
|
val dialogContainer: KNode = child {
|
|
hasTestTag(BaseDialogTestTags.CONTAINER)
|
|
}
|
|
|
|
val title: KNode = child {
|
|
hasTestTag(BaseDialogTestTags.TITLE)
|
|
}
|
|
|
|
val text: KNode = child {
|
|
hasTestTag(BaseDialogTestTags.TEXT)
|
|
}
|
|
|
|
val cancelButton: KNode = child {
|
|
hasTestTag(BaseButtonTestTags.BUTTON)
|
|
hasText(getResourceString(R.string.common_cancel))
|
|
}
|
|
|
|
val hideButton: KNode = child {
|
|
hasTestTag(BaseButtonTestTags.BUTTON)
|
|
hasText(getResourceString(R.string.token_details_hide_alert_hide))
|
|
}
|
|
|
|
val confirmButton: KNode = child {
|
|
hasTestTag(BaseButtonTestTags.BUTTON)
|
|
hasText(getResourceString(R.string.common_confirm))
|
|
}
|
|
|
|
val continueButton: KNode = child {
|
|
hasTestTag(BaseButtonTestTags.BUTTON)
|
|
hasText(getResourceString(R.string.common_continue))
|
|
}
|
|
|
|
val addButton: KNode = child {
|
|
hasTestTag(BaseButtonTestTags.BUTTON)
|
|
hasText(getResourceString(R.string.common_add))
|
|
}
|
|
|
|
val laterButton: KNode = child {
|
|
hasTestTag(BaseButtonTestTags.BUTTON)
|
|
hasText(getResourceString(R.string.common_later))
|
|
}
|
|
|
|
val okButton: KNode = child {
|
|
hasTestTag(BaseButtonTestTags.BUTTON)
|
|
hasText(getResourceString(R.string.common_ok))
|
|
}
|
|
|
|
val changeButton: KNode = child {
|
|
hasTestTag(BaseButtonTestTags.BUTTON)
|
|
hasText(getResourceString(R.string.common_change))
|
|
}
|
|
|
|
val skipAnywayButton: KNode = child {
|
|
hasTestTag(BaseButtonTestTags.BUTTON)
|
|
hasText(getResourceString(R.string.access_code_alert_skip_ok))
|
|
}
|
|
}
|
|
|
|
internal fun BaseTestCase.onDialog(function: DialogPageObject.() -> Unit) =
|
|
onComposeScreen(composeTestRule, function) |