- 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

@@ -56,7 +56,7 @@ commands:
test-command: ./gradlew connected<< parameters.flavour >>DebugAndroidTest
system-image: system-images;android-26;google_apis;x86
pull-data: true
pull-data-path: /storage/emulated/0/Android/data/
pull-data-path: /sdcard/Android/data/com.appttude.h_mal.<< parameters.flavour >>/files/screengrab/en-US/images/screenshots
pull-data-target: ~/app-data
restore-gradle-cache-prefix: v1a
# store test reports

View File

@@ -29,6 +29,19 @@
</AndroidTestResultsTableState>
</value>
</entry>
<entry key="-1906103057">
<value>
<AndroidTestResultsTableState>
<option name="preferredColumnWidths">
<map>
<entry key="Duration" value="90" />
<entry key="Pixel_2_API_27" value="120" />
<entry key="Tests" value="360" />
</map>
</option>
</AndroidTestResultsTableState>
</value>
</entry>
<entry key="-409920851">
<value>
<AndroidTestResultsTableState>

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")
}
}