Skip to content

Commit

Permalink
Less tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesa2 committed Jan 11, 2025
1 parent 0bbda06 commit b97d9cc
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions app/src/androidTest/java/com/panoramagl/sample/SmokeTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ import androidx.test.core.app.takeScreenshot
import androidx.test.core.graphics.writeToTestStorage
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions
import androidx.test.espresso.action.ViewActions.swipeDown
import androidx.test.espresso.action.ViewActions.swipeUp
import androidx.test.espresso.matcher.ViewMatchers.*
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.hamcrest.Matchers.allOf
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TestName
Expand All @@ -36,23 +33,23 @@ class SmokeTest {
takeScreenshot().writeToTestStorage("${javaClass.simpleName}_${nameRule.methodName}-button2")
}

@Test
fun swipeTest() {
Thread.sleep(100)
takeScreenshot().writeToTestStorage("${javaClass.simpleName}_${nameRule.methodName}-start")

repeat((0..10).count()) {
// swipe up
repeat((0..3).count()) {
onView(allOf(withId(R.id.content_view), isDisplayed())).perform(swipeUp())
}

// swipe Down
repeat((0..3).count()) {
onView(allOf(withId(R.id.content_view), isDisplayed())).perform(swipeDown())
}
}
takeScreenshot().writeToTestStorage("${javaClass.simpleName}_${nameRule.methodName}-end")
}
// @Test
// fun swipeTest() {
// Thread.sleep(100)
// takeScreenshot().writeToTestStorage("${javaClass.simpleName}_${nameRule.methodName}-start")
//
// repeat((0..10).count()) {
// // swipe up
// repeat((0..3).count()) {
// onView(allOf(withId(R.id.content_view), isDisplayed())).perform(swipeUp())
// }
//
// // swipe Down
// repeat((0..3).count()) {
// onView(allOf(withId(R.id.content_view), isDisplayed())).perform(swipeDown())
// }
// }
// takeScreenshot().writeToTestStorage("${javaClass.simpleName}_${nameRule.methodName}-end")
// }

}

0 comments on commit b97d9cc

Please sign in to comment.