-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #966 from StepicOrg/release/1.217
Release/1.217
- Loading branch information
Showing
12 changed files
with
89 additions
and
38 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
34 changes: 34 additions & 0 deletions
34
app/src/androidTest/java/org/stepik/android/view/auth/ui/activity/AuthSampleTest.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,34 @@ | ||
package org.stepik.android.view.auth.ui.activity | ||
|
||
import androidx.test.ext.junit.rules.ActivityScenarioRule | ||
import com.kaspersky.kaspresso.testcases.api.testcase.TestCase | ||
import org.junit.Rule | ||
import org.junit.Test | ||
|
||
class AuthSampleTest : TestCase() { | ||
@get:Rule | ||
val activityTestRule = ActivityScenarioRule(SocialAuthActivity::class.java) | ||
|
||
@Test | ||
fun test() = | ||
run { | ||
step("Open Social Auth Screen") { | ||
testLogger.d("I am testLogger") | ||
SocialAuthScreen { | ||
signInWithEmailButton { | ||
isVisible() | ||
click() | ||
} | ||
} | ||
} | ||
|
||
step("Open Credential Auth Screen") { | ||
CredentialAuthScreen { | ||
loginField.isVisible() | ||
loginField.typeText("[email protected]") | ||
passwordField.typeText("stepikthebest") | ||
loginField.hasText("[email protected]") | ||
} | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
app/src/androidTest/java/org/stepik/android/view/auth/ui/activity/CredentialAuthScreen.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,14 @@ | ||
package org.stepik.android.view.auth.ui.activity | ||
|
||
import org.stepic.droid.R | ||
import com.kaspersky.kaspresso.screens.KScreen | ||
import io.github.kakaocup.kakao.edit.KEditText | ||
|
||
object CredentialAuthScreen : KScreen<CredentialAuthScreen>() { | ||
override val layoutId: Int = R.layout.activity_auth_credential | ||
override val viewClass: Class<*> = CredentialAuthActivity::class.java | ||
|
||
val loginField = KEditText { withId(R.id.loginField) } | ||
val passwordField = KEditText { withId(R.id.passwordField) } | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
app/src/androidTest/java/org/stepik/android/view/auth/ui/activity/SocialAuthScreen.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,13 @@ | ||
package org.stepik.android.view.auth.ui.activity | ||
|
||
import com.kaspersky.kaspresso.screens.KScreen | ||
import io.github.kakaocup.kakao.text.KButton | ||
import org.stepic.droid.R | ||
|
||
object SocialAuthScreen : KScreen<SocialAuthScreen>() { | ||
|
||
override val layoutId: Int = R.layout.activity_auth_social | ||
override val viewClass: Class<*> = SocialAuthActivity::class.java | ||
|
||
val signInWithEmailButton = KButton { withId(R.id.signInWithEmail) } | ||
} |
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
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
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
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