Skip to content

Commit

Permalink
test: πŸ’ [DSY-1423] Adding tests to splash screen
Browse files Browse the repository at this point in the history
  • Loading branch information
mlcsouza committed Sep 1, 2020
1 parent 2344151 commit 857cb3e
Showing 1 changed file with 33 additions and 0 deletions.
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()))
}

}

0 comments on commit 857cb3e

Please sign in to comment.