Skip to content

Commit

Permalink
Fix breaking multi_api_level tests (#1653)
Browse files Browse the repository at this point in the history
* fix profileSettingsE2E on nightly (we are using different device than in local thats what caused the flakyness)

refs:
affects:
release note:

test plan:

* attempt to fix testAnnouncement_reply test case (it may do not wait enough for the webview to be loaded)

refs:
affects:
release note:

test plan:

* stub testFilters method on landscape mode because on lowres device its too narrow to scroll properly. Will be checked/refactored when we migrated from lowres device in nightly runs.

refs:
affects: Student
release note: none

* put back todoe2e tests on weekends. (to test on bitrise)

refs:
affects: Student, Teacher
release note: none

* put back todoe2e tests on weekends. (to test on bitrise)

refs:
affects: Student, Teacher
release note: none

* Fix breaking render tests on 'multi_api_level' jobs. (It was stubbed on Teacher because of the same issue, now, both Teacher and Student were fixed so Stubs has removed as well.)

refs:
affects:
release note:

test plan:
  • Loading branch information
kdeakinstructure authored Jul 20, 2022
1 parent 7418981 commit f200177
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import dagger.hilt.android.testing.HiltAndroidTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import java.lang.Thread.sleep

@HiltAndroidTest
@RunWith(AndroidJUnit4::class)
Expand Down Expand Up @@ -140,6 +141,7 @@ class SyllabusRenderTest : StudentRenderTest() {
loopMod = { it.effectRunner { emptyEffectRunner } }
}
activityRule.activity.loadFragment(fragment)
sleep(3000) // Need to wait here a bit because loadFragment needs some time.
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import com.spotify.mobius.runners.WorkRunner
import dagger.hilt.android.testing.HiltAndroidTest
import org.junit.Before
import org.junit.Test
import java.lang.Thread.sleep

@HiltAndroidTest
class SyllabusRenderTest : TeacherRenderTest() {
Expand Down Expand Up @@ -102,7 +103,6 @@ class SyllabusRenderTest : TeacherRenderTest() {
}

@Test
@Stub
fun tappingEventsDisplaysEvents() {
val model = baseModel.copy(events = DataResult.Success(List(3) { ScheduleItem(title = it.toString()) }))
loadPageWithModel(model)
Expand All @@ -113,7 +113,6 @@ class SyllabusRenderTest : TeacherRenderTest() {
}

@Test
@Stub
fun swipingToEventsDisplaysEvents() {
val model = baseModel.copy(events = DataResult.Success(List(3) { ScheduleItem(title = it.toString()) }))
loadPageWithModel(model)
Expand Down Expand Up @@ -153,5 +152,6 @@ class SyllabusRenderTest : TeacherRenderTest() {
loopMod = { it.effectRunner { emptyEffectRunner } }
}
activityRule.activity.loadFragment(fragment)
sleep(3000) // Need to wait here a bit because loadFragment needs some time.
}
}

0 comments on commit f200177

Please sign in to comment.