diff --git a/.circleci/config.yml b/.circleci/config.yml
index d69dd23..5a22029 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -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
diff --git a/.idea/androidTestResultsUserPreferences.xml b/.idea/androidTestResultsUserPreferences.xml
index b3dab32..66e1e63 100644
--- a/.idea/androidTestResultsUserPreferences.xml
+++ b/.idea/androidTestResultsUserPreferences.xml
@@ -29,6 +29,19 @@
+
+
+
+
+
+
+
diff --git a/app/src/androidTestAtlasWeather/java/com/appttude/h_mal/atlas_weather/robot/HomeScreenRobot.kt b/app/src/androidTestAtlasWeather/java/com/appttude/h_mal/atlas_weather/robot/HomeScreenRobot.kt
index 42c4dd8..e4b19de 100644
--- a/app/src/androidTestAtlasWeather/java/com/appttude/h_mal/atlas_weather/robot/HomeScreenRobot.kt
+++ b/app/src/androidTestAtlasWeather/java/com/appttude/h_mal/atlas_weather/robot/HomeScreenRobot.kt
@@ -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)
}
\ No newline at end of file
diff --git a/app/src/androidTestAtlasWeather/java/com/appttude/h_mal/atlas_weather/tests/HomePageUITest.kt b/app/src/androidTestAtlasWeather/java/com/appttude/h_mal/atlas_weather/tests/HomePageUITest.kt
index 5e59b4c..789eeaf 100644
--- a/app/src/androidTestAtlasWeather/java/com/appttude/h_mal/atlas_weather/tests/HomePageUITest.kt
+++ b/app/src/androidTestAtlasWeather/java/com/appttude/h_mal/atlas_weather/tests/HomePageUITest.kt
@@ -16,7 +16,7 @@ class HomePageUITest : BaseTest(MainActivity::class.java) {
@Test
fun loadApp_validWeatherResponse_returnsValidPage() {
homeScreen {
- waitFor(2000)
+ isDisplayed()
verifyCurrentTemperature(2)
verifyCurrentLocation("Mock Location")
}
diff --git a/app/src/androidTestMonoWeather/java/com/appttude/h_mal/monoWeather/robot/HomeScreenRobot.kt b/app/src/androidTestMonoWeather/java/com/appttude/h_mal/monoWeather/robot/HomeScreenRobot.kt
index ae2dde2..834397a 100644
--- a/app/src/androidTestMonoWeather/java/com/appttude/h_mal/monoWeather/robot/HomeScreenRobot.kt
+++ b/app/src/androidTestMonoWeather/java/com/appttude/h_mal/monoWeather/robot/HomeScreenRobot.kt
@@ -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)
}
\ No newline at end of file
diff --git a/app/src/androidTestMonoWeather/java/com/appttude/h_mal/monoWeather/tests/HomePageUITest.kt b/app/src/androidTestMonoWeather/java/com/appttude/h_mal/monoWeather/tests/HomePageUITest.kt
index 35bbaf7..6f27b73 100644
--- a/app/src/androidTestMonoWeather/java/com/appttude/h_mal/monoWeather/tests/HomePageUITest.kt
+++ b/app/src/androidTestMonoWeather/java/com/appttude/h_mal/monoWeather/tests/HomePageUITest.kt
@@ -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")
}
}