Skip to content

Commit

Permalink
Fixes test
Browse files Browse the repository at this point in the history
  • Loading branch information
theMr17 committed Oct 17, 2023
1 parent a533a53 commit d9c3f77
Showing 1 changed file with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1078,17 +1078,14 @@ class ExplorationActivityTest {
explorationDataController.stopPlayingExploration(isCompletion = false)
}

// TODO(#89): The ExplorationActivity takes time to finish. This test case is failing currently.
@Test
@Ignore("The ExplorationActivity takes time to finish, needs to fixed in #89.")
fun testAudioWifi_ratioExp_audioIcon_audioFragHasDefaultLangAndAutoPlays() {
getApplicationDependencies(
internalProfileId,
RATIOS_TOPIC_ID,
RATIOS_STORY_ID_0,
RATIOS_EXPLORATION_ID_0
)
networkConnectionUtil.setCurrentConnectionStatus(ProdConnectionStatus.LOCAL)
launch<ExplorationActivity>(
createExplorationActivityIntent(
internalProfileId,
Expand All @@ -1099,20 +1096,18 @@ class ExplorationActivityTest {
)
).use {
waitForTheView(withText("What is a Ratio?"))
networkConnectionUtil.setCurrentConnectionStatus(ProdConnectionStatus.LOCAL)
testCoroutineDispatchers.runCurrent()
onView(withId(R.id.action_audio_player)).perform(click())
onView(
allOf(
withId(R.id.play_pause_audio_icon),
withEffectiveVisibility(Visibility.VISIBLE)
)
)
onView(allOf(withId(R.id.audio_language_icon), withEffectiveVisibility(Visibility.VISIBLE)))

testCoroutineDispatchers.runCurrent()
onView(withId(R.id.audio_bar_container)).check(matches(isDisplayed()))
onView(withId(R.id.audio_fragment_voiceover_progressbar)).check(matches(isDisplayed()))

waitForTheView(withDrawable(R.drawable.ic_pause_circle_filled_white_24dp))
onView(withId(R.id.play_pause_audio_icon)).check(
matches(
withDrawable(
R.drawable.ic_pause_circle_filled_white_24dp
)
withDrawable(R.drawable.ic_pause_circle_filled_white_24dp)
)
)
}
Expand Down

0 comments on commit d9c3f77

Please sign in to comment.