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 a53679b
Showing 1 changed file with 4 additions and 3 deletions.
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 a53679b

Please sign in to comment.