Cleaning code to make them work ?

This commit is contained in:
Amine 2017-10-27 18:51:30 +02:00
parent a9b61853b9
commit e6f367acaf
2 changed files with 2 additions and 33 deletions

View File

@ -23,7 +23,6 @@ import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import apps.amine.bou.readerforselfoss.settings.SettingsActivity
import apps.amine.bou.readerforselfoss.utils.Config
import org.junit.After
@ -86,9 +85,6 @@ class HomeActivityEspressoTest {
intended(hasComponent(LoginActivity::class.java.name), times(1))
//onView(isRoot()).perform(pressBack())
}
@Test
@ -108,10 +104,6 @@ class HomeActivityEspressoTest {
onView(withId(R.id.material_drawer_layout)).perform(DrawerActions.open())
onView(withText(R.string.drawer_action_clear)).perform(click())
// bug
//onView(withText(R.string.title_activity_settings)).perform(scrollTo(), click())
//intended(hasComponent(SettingsActivity::class.java.name))
}
// TODO: test articles opening and actions for cards and lists

View File

@ -46,7 +46,7 @@ class IntroActivityEspressoTest {
Intents.init()
}
/*@Test
@Test
fun nextEachTimes() {
rule.launchActivity(Intent())
@ -61,7 +61,7 @@ class IntroActivityEspressoTest {
intended(hasComponent(IntroActivity::class.java.name), times(1))
intended(hasComponent(LoginActivity::class.java.name), times(1))
}*/
}
@Test
fun nextBackRandomTimes() {
@ -91,29 +91,6 @@ class IntroActivityEspressoTest {
}
@Test
fun clickSelfossUrl() {
rule.launchActivity(Intent())
onView(withText(R.string.intro_hello_title)).check(matches(isDisplayed()))
onView(withId(R.id.button_next)).perform(click())
onView(withId(R.id.button_message)).perform(click())
intended(
allOf(
hasData(
hasHost(
equalTo("selfoss.aditu.de")
)
),
hasAction(Intent.ACTION_VIEW)
)
)
}
@After
fun releaseIntents() {
Intents.release()