|
@@ -5,13 +5,11 @@ import android.view.KeyEvent
|
|
|
import androidx.test.espresso.Espresso.onView
|
|
import androidx.test.espresso.Espresso.onView
|
|
|
import androidx.test.espresso.action.ViewActions.*
|
|
import androidx.test.espresso.action.ViewActions.*
|
|
|
import androidx.test.espresso.assertion.ViewAssertions.matches
|
|
import androidx.test.espresso.assertion.ViewAssertions.matches
|
|
|
-import androidx.test.espresso.matcher.RootMatchers
|
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers.*
|
|
import androidx.test.espresso.matcher.ViewMatchers.*
|
|
|
import androidx.test.filters.LargeTest
|
|
import androidx.test.filters.LargeTest
|
|
|
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
|
|
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
|
|
|
import androidx.test.rule.ActivityTestRule
|
|
import androidx.test.rule.ActivityTestRule
|
|
|
import org.hamcrest.CoreMatchers.allOf
|
|
import org.hamcrest.CoreMatchers.allOf
|
|
|
-import org.hamcrest.Matchers
|
|
|
|
|
import org.junit.Rule
|
|
import org.junit.Rule
|
|
|
import org.junit.Test
|
|
import org.junit.Test
|
|
|
import org.junit.runner.RunWith
|
|
import org.junit.runner.RunWith
|
|
@@ -37,25 +35,4 @@ class TasksFragmentTest {
|
|
|
|
|
|
|
|
checkBox.check(matches(isNotChecked()))
|
|
checkBox.check(matches(isNotChecked()))
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- @Test
|
|
|
|
|
- fun isStartButtonShown() {
|
|
|
|
|
- val button = onView(allOf(withText(R.string.setup_button_start)))
|
|
|
|
|
- button.check(matches(isDisplayed()))
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- @Test
|
|
|
|
|
- fun noAppsSelected() {
|
|
|
|
|
- val startButton = onView(allOf(withText(R.string.setup_button_start)))
|
|
|
|
|
- startButton.perform(click())
|
|
|
|
|
-
|
|
|
|
|
- val appCompatButton2 = onView(
|
|
|
|
|
- allOf(withText("DONE")))
|
|
|
|
|
- appCompatButton2.perform(scrollTo(), click())
|
|
|
|
|
-
|
|
|
|
|
- onView(withText(R.string.no_app_selected_toast_msg)).inRoot(
|
|
|
|
|
- RootMatchers.withDecorView(Matchers.not(Matchers.`is`(mActivityTestRule.activity.window.decorView))))
|
|
|
|
|
- .check(matches(isDisplayed()))
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|