- Failing test fixed

- circleci updated to capture screenshot
This commit is contained in:
2023-08-08 22:44:24 +01:00
parent 9a0189c8ec
commit 2181cb70b1
6 changed files with 19 additions and 5 deletions

View File

@@ -10,4 +10,5 @@ class HomeScreenRobot : BaseTestRobot() {
fun verifyCurrentLocation(location: String) = matchText(R.id.location_main_4, location)
fun refresh() = pullToRefresh(R.id.swipe_refresh)
fun isDisplayed() = matchViewWaitFor(R.id.temp_main_4)
}

View File

@@ -16,7 +16,7 @@ class HomePageUITest : BaseTest<MainActivity>(MainActivity::class.java) {
@Test
fun loadApp_validWeatherResponse_returnsValidPage() {
homeScreen {
waitFor(2000)
isDisplayed()
verifyCurrentTemperature(2)
verifyCurrentLocation("Mock Location")
}

View File

@@ -10,4 +10,5 @@ class HomeScreenRobot : BaseTestRobot() {
fun verifyCurrentLocation(location: String) = matchText(R.id.location_main_4, location)
fun refresh() = pullToRefresh(R.id.swipe_refresh)
fun isDisplayed() = matchViewWaitFor(R.id.temp_main_4)
}

View File

@@ -1,11 +1,10 @@
package com.appttude.h_mal.monoWeather.tests
00import com.appttude.h_mal.atlas_weather.utils.Stubs
import com.appttude.h_mal.atlas_weather.utils.Stubs
import com.appttude.h_mal.monoWeather.MonoBaseTest
import com.appttude.h_mal.monoWeather.robot.homeScreen
import org.junit.Test
import java.io.IOException
class HomePageUITest : MonoBaseTest() {
@@ -16,9 +15,9 @@ class HomePageUITest : MonoBaseTest() {
@Test
fun loadApp_validWeatherResponse_returnsValidPage() {
homeScreen {
isDisplayed()
verifyCurrentTemperature(2)
verifyCurrentLocation("Mock Location")
}
throw IOException("sdfsdfasdfasdfasdf")
}
}