Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix part of #2480: Fixes 2 Audio Tests #5245

Merged
merged 70 commits into from
Dec 7, 2023
Merged
Changes from 68 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
b0d2c72
Fixing tests
theMr17 Nov 25, 2023
7e092ca
Fixing tests
theMr17 Nov 25, 2023
17de487
Fixing tests
theMr17 Nov 25, 2023
767dbab
Fixing tests
theMr17 Nov 25, 2023
68a4d99
Fixing tests
theMr17 Nov 29, 2023
8889111
Fixing tests
theMr17 Nov 29, 2023
58daf69
Fixed testAudioWifi_ratioExp_audioIcon_audioFragHasDefaultLangAndAuto…
theMr17 Nov 29, 2023
5a836e2
Fixing tests
theMr17 Nov 29, 2023
d3d1c00
Fixing tests
theMr17 Nov 29, 2023
7e31f00
Fixing tests
theMr17 Nov 29, 2023
ba9d51c
Fixing tests
theMr17 Nov 30, 2023
6007c04
Fixing tests
theMr17 Nov 30, 2023
d248806
Fixing tests
theMr17 Nov 30, 2023
10cb0a0
Fixing tests
theMr17 Nov 30, 2023
d590b42
Fixing tests
theMr17 Nov 30, 2023
5e9ea1d
Fixing tests
theMr17 Nov 30, 2023
51e7877
Fixing tests
theMr17 Nov 30, 2023
38922cc
Fixing tests
theMr17 Nov 30, 2023
21d03df
Fixing tests
theMr17 Nov 30, 2023
6e61947
Fixing tests
theMr17 Nov 30, 2023
f06af1d
Fixing tests
theMr17 Nov 30, 2023
82a0e70
Fixing tests
theMr17 Nov 30, 2023
1056fcb
Fixing tests
theMr17 Nov 30, 2023
95e1342
Fixing tests
theMr17 Nov 30, 2023
50f0bf2
Fixing tests
theMr17 Dec 1, 2023
f8288ff
Fixing tests
theMr17 Dec 1, 2023
953e93e
Fixing tests
theMr17 Dec 1, 2023
67da6fc
Fixing tests
theMr17 Dec 1, 2023
8e383ed
Fixing tests
theMr17 Dec 1, 2023
b1fe58b
Fixing tests
theMr17 Dec 1, 2023
0f31092
Fixing tests
theMr17 Dec 1, 2023
0da1c6c
Revert "Fixing tests"
theMr17 Dec 1, 2023
34d9729
Fixing tests
theMr17 Dec 1, 2023
23976b5
Fixing tests
theMr17 Dec 1, 2023
b0f5a24
Fixing tests
theMr17 Dec 1, 2023
5e28b4d
Fixing tests
theMr17 Dec 1, 2023
2b9e26c
Fixing tests
theMr17 Dec 1, 2023
e86d40e
Fixing tests
theMr17 Dec 1, 2023
1cc0a94
Fixing tests
theMr17 Dec 1, 2023
a174fd0
Fixing tests
theMr17 Dec 1, 2023
8d5cbd2
Fixing tests
theMr17 Dec 1, 2023
aeae5bd
Fixing tests
theMr17 Dec 1, 2023
e9f38a1
Fixing tests
theMr17 Dec 1, 2023
b39a957
Fixing tests
theMr17 Dec 1, 2023
9c23f07
Revert "Fixing tests"
theMr17 Dec 1, 2023
c25518c
Revert "Fixing tests"
theMr17 Dec 1, 2023
6acd6df
Fixing tests
theMr17 Dec 1, 2023
f3084da
Fixing tests
theMr17 Dec 1, 2023
a50fc54
Fixing tests
theMr17 Dec 1, 2023
51afd8f
Fixing tests
theMr17 Dec 1, 2023
025b7fe
Fixing tests
theMr17 Dec 4, 2023
d5e634d
Fixing tests
theMr17 Dec 4, 2023
8067012
Fixing tests
theMr17 Dec 4, 2023
8267774
Fixing tests
theMr17 Dec 4, 2023
5066d39
Merge branch 'develop' into fix/audio-tests
theMr17 Dec 6, 2023
6f42c3a
Fixing tests
theMr17 Dec 6, 2023
fef953d
Fixing tests
theMr17 Dec 6, 2023
1cee16a
Fixing tests
theMr17 Dec 6, 2023
8b09524
Fixing tests
theMr17 Dec 6, 2023
23f0e7d
Fixing tests
theMr17 Dec 6, 2023
2fba2dc
Fixing tests
theMr17 Dec 6, 2023
d573864
Fixing tests
theMr17 Dec 6, 2023
a85b852
Fixing tests
theMr17 Dec 6, 2023
3ec3d05
Fixing tests
theMr17 Dec 6, 2023
43bbaba
Fixing tests
theMr17 Dec 7, 2023
43383d7
Fixing tests
theMr17 Dec 7, 2023
ae5db48
Fixing tests
theMr17 Dec 7, 2023
443853f
Fixed testAudioWifi_ratioExp_continueInteraction_audioButton_submitAn…
theMr17 Dec 7, 2023
2844d8b
Minor fixes
theMr17 Dec 7, 2023
32edff3
Merge branch 'develop' into fix/audio-tests
adhiamboperes Dec 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1077,17 +1077,10 @@ 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)
markAllSpotlightsSeen()
setUpAudio()
launch<ExplorationActivity>(
createExplorationActivityIntent(
internalProfileId,
Expand All @@ -1097,23 +1090,28 @@ class ExplorationActivityTest {
shouldSavePartialProgress = false
)
).use {
waitForTheView(withText("What is a Ratio?"))
onView(withId(R.id.action_audio_player)).perform(click())
onView(
allOf(
withId(R.id.play_pause_audio_icon),
withEffectiveVisibility(Visibility.VISIBLE)
)
explorationDataController.startPlayingNewExploration(
internalProfileId,
RATIOS_TOPIC_ID,
RATIOS_STORY_ID_0,
RATIOS_EXPLORATION_ID_0
)
onView(allOf(withId(R.id.audio_language_icon), withEffectiveVisibility(Visibility.VISIBLE)))
networkConnectionUtil.setCurrentConnectionStatus(ProdConnectionStatus.LOCAL)
testCoroutineDispatchers.runCurrent()
onView(withId(R.id.action_audio_player)).perform(click())

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)
)
)

onView(withText("What is a Ratio?"))
adhiamboperes marked this conversation as resolved.
Show resolved Hide resolved
}
explorationDataController.stopPlayingExploration(isCompletion = false)
}
Expand Down Expand Up @@ -1179,17 +1177,11 @@ 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.")
@RunOn(TestPlatform.ESPRESSO)
fun testAudioWifi_ratioExp_continueInteraction_audioButton_submitAns_feedbackAudioPlays() {
getApplicationDependencies(
internalProfileId,
RATIOS_TOPIC_ID,
RATIOS_STORY_ID_0,
RATIOS_EXPLORATION_ID_0
)
networkConnectionUtil.setCurrentConnectionStatus(ProdConnectionStatus.LOCAL)
markAllSpotlightsSeen()
setUpAudio()
launch<ExplorationActivity>(
createExplorationActivityIntent(
internalProfileId,
Expand All @@ -1199,15 +1191,25 @@ class ExplorationActivityTest {
shouldSavePartialProgress = false
)
).use {
waitForTheView(withText("What is a Ratio?"))
// Clicks continue until we reach the first interaction.
onView(withId(R.id.continue_interaction_button)).perform(click())
onView(withId(R.id.continue_interaction_button)).perform(click())
onView(withId(R.id.continue_interaction_button)).perform(click())
onView(withId(R.id.continue_interaction_button)).perform(click())
onView(withId(R.id.continue_interaction_button)).perform(click())
explorationDataController.startPlayingNewExploration(
internalProfileId,
RATIOS_TOPIC_ID,
RATIOS_STORY_ID_0,
RATIOS_EXPLORATION_ID_0
)
networkConnectionUtil.setCurrentConnectionStatus(ProdConnectionStatus.LOCAL)
testCoroutineDispatchers.runCurrent()

clickContinueButton()
clickContinueButton()
clickContinueButton()
clickContinueButton()
clickContinueButton()

onView(withId(R.id.action_audio_player)).perform(click())
testCoroutineDispatchers.runCurrent()

scrollToViewType(StateItemViewModel.ViewType.TEXT_INPUT_INTERACTION)
onView(withId(R.id.text_input_interaction_view)).perform(
editTextInputAction.appendText("123"),
closeSoftKeyboard()
Expand All @@ -1217,6 +1219,8 @@ class ExplorationActivityTest {

onView(withId(R.id.play_pause_audio_icon))
.check(matches(withContentDescription(context.getString(R.string.audio_pause_description))))

onView(withText("What is a Ratio?"))
}
explorationDataController.stopPlayingExploration(isCompletion = false)
}
Expand Down
Loading