mirror of
https://github.com/hmalik144/Weather-apps.git
synced 2026-03-17 23:16:01 +00:00
- Failing test fixed
- circleci updated to capture screenshot
This commit is contained in:
@@ -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
|
||||
|
||||
13
.idea/androidTestResultsUserPreferences.xml
generated
13
.idea/androidTestResultsUserPreferences.xml
generated
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user