Skip to content

Commit

Permalink
Fix part of #2057: Remove unnecessary RunOn from QuestionPlayerActivi…
Browse files Browse the repository at this point in the history
…tyTest (#2189)

* remove unnecessary runon

* add doc and bind with OppiaTestRule

* fix typo
  • Loading branch information
anandwana001 authored Dec 2, 2020
1 parent 1863faf commit 8e4b439
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import org.hamcrest.Matcher
import org.hamcrest.TypeSafeMatcher
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.R
Expand Down Expand Up @@ -75,6 +76,7 @@ import org.oppia.android.domain.question.QuestionTrainingSeed
import org.oppia.android.domain.topic.FRACTIONS_SKILL_ID_0
import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule
import org.oppia.android.testing.CoroutineExecutorService
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.RunOn
import org.oppia.android.testing.TestAccessibilityModule
import org.oppia.android.testing.TestCoroutineDispatchers
Expand Down Expand Up @@ -105,6 +107,9 @@ class QuestionPlayerActivityTest {
// TODO(#503): add tests for QuestionPlayerActivity (use StateFragmentTest for a reference).
// TODO(#1273): add tests for Hints and Solution in Question Player.

@get:Rule
val oppiaTestRule = OppiaTestRule()

@Inject
lateinit var testCoroutineDispatchers: TestCoroutineDispatchers

Expand Down Expand Up @@ -210,7 +215,7 @@ class QuestionPlayerActivityTest {
}

// TODO(#2057): Remove when TextViews are properly measured in Robolectric.
@RunOn(TestPlatform.ESPRESSO)
@RunOn(TestPlatform.ESPRESSO) // Incorrectly passes on Robolectric and shouldn't be re-enabled
@Test
fun testChooseCorrectAnswer_answerLongerThanScreen_phonePort_tickIsCompletelyVisible() {
launchForSkillList(SKILL_ID_LIST).use {
Expand All @@ -225,7 +230,7 @@ class QuestionPlayerActivityTest {
}

// TODO(#2057): Remove when TextViews are properly measured in Robolectric.
@RunOn(TestPlatform.ESPRESSO)
@RunOn(TestPlatform.ESPRESSO) // Incorrectly passes on Robolectric and shouldn't be re-enabled
@Test
fun testChooseCorrectAnswer_answerLongerThanScreen_phoneLand_tickIsCompletelyVisible() {
launchForSkillList(SKILL_ID_LIST).use {
Expand All @@ -241,7 +246,7 @@ class QuestionPlayerActivityTest {
}

// TODO(#2057): Remove when TextViews are properly measured in Robolectric.
@RunOn(TestPlatform.ESPRESSO)
@RunOn(TestPlatform.ESPRESSO) // Incorrectly passes on Robolectric and shouldn't be re-enabled
@Config(qualifiers = "sw600dp")
@Test
fun testChooseCorrectAnswer_answerLongerThanScreen_tabletPort_tickIsCompletelyVisible() {
Expand All @@ -257,7 +262,7 @@ class QuestionPlayerActivityTest {
}

// TODO(#2057): Remove when TextViews are properly measured in Robolectric.
@RunOn(TestPlatform.ESPRESSO)
@RunOn(TestPlatform.ESPRESSO) // Incorrectly passes on Robolectric and shouldn't be re-enabled
@Config(qualifiers = "sw600dp")
@Test
fun testChooseCorrectAnswer_answerLongerThanScreen_tabletLand_tickIsCompletelyVisible() {
Expand Down

0 comments on commit 8e4b439

Please sign in to comment.