Skip to content

Commit

Permalink
Paintroid-503 Fixed the LandscapeIntegrationTest
Browse files Browse the repository at this point in the history
  • Loading branch information
exland committed May 24, 2023
1 parent 0b55c54 commit 32e1287
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pipeline {
stage('Device Tests') {
steps {
sh "echo no | avdmanager create avd --force --name android28 --package 'system-images;android-28;default;x86_64'"
sh "/home/user/android/sdk/emulator/emulator -no-window -no-boot-anim -noaudio -avd android28 > /dev/null 2>&1 &"
sh "/home/user/android/sdk/emulator/emulator @Pixel_5_API_28 -no-window -no-boot-anim -noaudio -avd android28 > /dev/null 2>&1 &"
sh './gradlew -PenableCoverage -Pjenkins -Pemulator=android28 -Pci createDebugCoverageReport -i'
}
post {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
import android.graphics.Color
import androidx.annotation.ArrayRes
import androidx.annotation.ColorInt
import androidx.test.espresso.Espresso
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.Espresso.pressBack
import androidx.test.espresso.IdlingRegistry
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.action.ViewActions.scrollTo
import androidx.test.espresso.assertion.ViewAssertions.matches
Expand Down Expand Up @@ -84,11 +84,11 @@ class LandscapeIntegrationTest {
fun setUp() {
mainActivity = activityTestRule.activity
idlingResource = mainActivity?.idlingResource
IdlingRegistry.getInstance().register(idlingResource)
Espresso.registerIdlingResources(idlingResource)
}

@After
fun tearDown() { IdlingRegistry.getInstance().unregister(idlingResource) }
fun tearDown() { Espresso.registerIdlingResources(idlingResource) }

@Test
fun testLandscapeMode() {
Expand Down Expand Up @@ -418,6 +418,7 @@ class LandscapeIntegrationTest {
if (tools) { continue }
onToolBarView()
.performSelectTool(toolType)
Thread.sleep(1000)
onBottomNavigationView()
.checkShowsCurrentTool(toolType)
}
Expand Down

0 comments on commit 32e1287

Please sign in to comment.