Skip to content
Snippets Groups Projects
Commit 16338a9a authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Fix the UI tests

parent bd21f9c0
No related branches found
No related tags found
1 merge request!1061Tests and fastlane
......@@ -104,7 +104,7 @@ class PhoneScreenhotsInstrumentedTest : BaseUITest() {
val rvMatcher = withRecyclerView(R.id.video_grid)
Log.d("Espresso", "2")
onView(rvMatcher.atPosition(3)).perform(click())
onView(rvMatcher.atPosition(2)).perform(click())
Log.d("Espresso", "3")
rotateLandscape()
......
......@@ -36,9 +36,9 @@ class PlaylistActivityUITest: BaseUITest() {
Thread.sleep(3 * 1000)
val ml = Medialibrary.getInstance()
val pl = ml.createPlaylist("test")
pl.append(ml.getPagedVideos(Medialibrary.SORT_DEFAULT, false, 5, 0).map { it.id })
pl.append(ml.getPagedAudio(Medialibrary.SORT_DEFAULT, false, 5, 0).map { it.id })
val pl = ml.createPlaylist("test", true)
pl.append(ml.getPagedVideos(Medialibrary.SORT_DEFAULT, false, true, 5, 0).map { it.id })
pl.append(ml.getPagedAudio(Medialibrary.SORT_DEFAULT, false, true, 5, 0).map { it.id })
val intent = Intent().apply {
putExtra(AudioBrowserFragment.TAG_ITEM, pl)
......
......@@ -52,9 +52,9 @@ class PlaylistFragmentUITest: BaseUITest() {
private fun createDummyPlaylist() {
val ml = Medialibrary.getInstance()
val pl = ml.createPlaylist(DUMMY_PLAYLIST)
pl.append(ml.getPagedVideos(Medialibrary.SORT_DEFAULT, false, 5, 0).map { it.id })
pl.append(ml.getPagedAudio(Medialibrary.SORT_DEFAULT, false, 5, 0).map { it.id })
val pl = ml.createPlaylist(DUMMY_PLAYLIST, true)
pl.append(ml.getPagedVideos(Medialibrary.SORT_DEFAULT, false, true, 5, 0).map { it.id })
pl.append(ml.getPagedAudio(Medialibrary.SORT_DEFAULT, false, true, 5, 0).map { it.id })
}
@Test
......
......@@ -91,6 +91,6 @@ class PreferencesFragmentUITest: BasePreferenceUITest() {
companion object {
val MAP_PIP_MODE = mapOf("0" to R.string.stop, "1" to R.string.play_as_audio_background, "2" to R.string.play_pip_title)
val MAP_HARDWARE_ACCEL = mapOf("-1" to R.string.automatic, "0" to R.string.hardware_acceleration_disabled, "1" to R.string.hardware_acceleration_decoding, "2" to R.string.hardware_acceleration_full)
val MAP_ORIENTATION = mapOf("99" to R.string.screen_orientation_sensor, "100" to R.string.screen_orientation_start_lock, "101" to R.string.screen_orientation_landscape, "102" to R.string.screen_orientation_portrait)
val MAP_ORIENTATION = mapOf("99" to R.string.screen_orientation_sensor, "101" to R.string.screen_orientation_landscape, "102" to R.string.screen_orientation_portrait)
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment