Skip to content

Commit

Permalink
Reduce tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesa2 committed Apr 7, 2024
1 parent 673210e commit 97c5fc5
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions app/src/androidTest/java/com/panoramagl/sample/SmokeTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,29 @@ class SmokeTest {
Thread.sleep(100)
takeScreenshot().writeToTestStorage("${javaClass.simpleName}_${nameRule.methodName}-start")

Espresso.onView(withId(R.id.button_1)).perform(ViewActions.click())
onView(withId(R.id.button_1)).perform(ViewActions.click())
takeScreenshot().writeToTestStorage("${javaClass.simpleName}_${nameRule.methodName}-button1")
Espresso.onView(withId(R.id.button_2)).perform(ViewActions.click())
onView(withId(R.id.button_2)).perform(ViewActions.click())
takeScreenshot().writeToTestStorage("${javaClass.simpleName}_${nameRule.methodName}-button2")
}

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

(0..10).forEach { x ->
// swipe up
(0..3).forEach { i ->
onView(allOf(withId(R.id.content_view), isDisplayed())).perform(swipeUp())
}

// swipe Down
(0..3).forEach { i ->
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")
//
// (0..10).forEach { x ->
// // swipe up
// (0..3).forEach { i ->
// onView(allOf(withId(R.id.content_view), isDisplayed())).perform(swipeUp())
// }
//
// // swipe Down
// (0..3).forEach { i ->
// onView(allOf(withId(R.id.content_view), isDisplayed())).perform(swipeDown())
// }
// }
// takeScreenshot().writeToTestStorage("${javaClass.simpleName}_${nameRule.methodName}-end")
// }

}

0 comments on commit 97c5fc5

Please sign in to comment.