Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kaspresso test #965

Draft
wants to merge 8 commits into
base: development
Choose a base branch
from
Draft

Kaspresso test #965

wants to merge 8 commits into from

Conversation

VitaliyYa
Copy link

YouTrack task: #

Description List:

  • ..
  • ..

@VitaliyYa VitaliyYa self-assigned this Apr 5, 2022
@VitaliyYa VitaliyYa marked this pull request as draft April 5, 2022 21:07

val passwordField = KEditText {
withId(R.id.passwordField)
isDisplayed()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чтобы зафейлить тест, попробова скрыть эту вьюху в разметке, в итоге тест падает на моменте, когда не удается вызвать click(). Видимо, тут лучше только писать withId(.. и прочие штуки, которые находят вьюху.

isDisplayed()
}

fun loginWithEmailAndPassword(email: String, password: String) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мне это нравится, можно переиспользовать для разных кейсов с логином

SocialAuthScreen {
moreButton {
isVisible()
hasText("More")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чтобы избегать ошибок из-за локали, можно вместо "More" написать R.string.social_recycler_show_more, а вверху файла import org.stepic.droid.R.

import org.junit.Rule
import org.junit.Test

class SocialAuthScreenTest : TestCase() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Стоит назвать файл так же как и класс.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants