diff --git a/uhabits-android/src/androidTest/java/org/isoron/uhabits/acceptance/steps/CommonSteps.kt b/uhabits-android/src/androidTest/java/org/isoron/uhabits/acceptance/steps/CommonSteps.kt index 652bc7510..f9642cbfc 100644 --- a/uhabits-android/src/androidTest/java/org/isoron/uhabits/acceptance/steps/CommonSteps.kt +++ b/uhabits-android/src/androidTest/java/org/isoron/uhabits/acceptance/steps/CommonSteps.kt @@ -46,7 +46,6 @@ object CommonSteps : BaseUserInterfaceTest() { fun clickText(text: String?) { scrollToText(text) Espresso.onView(ViewMatchers.withText(text)).perform(ViewActions.click()) - device.waitForIdle() } fun clickText(@StringRes id: Int) { @@ -192,11 +191,35 @@ object CommonSteps : BaseUserInterfaceTest() { } fun changeFrequencyToMonthly(habitName: String) { + var startTime: Long + var endTime: Long + + startTime = System.nanoTime() clickText(habitName) + endTime = System.nanoTime() + println("clickText() took ${(endTime - startTime)/1000000} milliseconds") + + startTime = System.nanoTime() Espresso.onView(ViewMatchers.withId(R.id.action_edit_habit)).perform(ViewActions.click()) + endTime = System.nanoTime() + println("onView() took ${(endTime - startTime)/1000000} milliseconds") + + startTime = System.nanoTime() EditHabitSteps.pickMonthFrequency() + endTime = System.nanoTime() + println("pickMonthFrequency() took ${(endTime - startTime)/1000000} milliseconds") + + startTime = System.nanoTime() EditHabitSteps.clickSave() + endTime = System.nanoTime() + println("clickSave() took ${(endTime - startTime)/1000000} milliseconds") + + startTime = System.nanoTime() pressBack() + endTime = System.nanoTime() + println("pressBack() took ${(endTime - startTime)/1000000} milliseconds") + + } enum class Screen {