-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: π [DSY-1423] Adding tests to splash screen
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
sample/src/androidTest/kotlin/com/natura/android/sample/SplashScreenFunctionalTests.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,33 @@ | ||
package com.natura.android.sample | ||
|
||
import androidx.test.core.app.ActivityScenario | ||
import androidx.test.espresso.Espresso.onView | ||
import androidx.test.espresso.assertion.ViewAssertions.matches | ||
import androidx.test.espresso.matcher.ViewMatchers.withId | ||
import androidx.test.espresso.matcher.ViewMatchers.withText | ||
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import org.junit.Before | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class SplashScreenFunctionalTestsTests { | ||
@Before | ||
fun setup() { | ||
ActivityScenario.launch(SplashActivity::class.java) | ||
} | ||
|
||
@Test | ||
fun shouldOpenBorderRadiusScreenWhenTapOnItButton() { | ||
onView(withText("NATDS")) | ||
.check(matches(isDisplayed())) | ||
|
||
onView(withText("Natura Design System")) | ||
.check(matches(isDisplayed())) | ||
|
||
onView(withId(R.id.naturaCoLogo)) | ||
.check(matches(isDisplayed())) | ||
} | ||
|
||
} |