mirror of
https://github.com/hmalik144/Weather-apps.git
synced 2026-01-31 02:51:46 +00:00
- readme.md added
- Snapshot tests added for readme.md - UI corrections during snapshots
This commit is contained in:
@@ -21,7 +21,7 @@ class TestAppClass : AtlasApp() {
|
|||||||
private val mockingNetworkInterceptor = MockingNetworkInterceptor(idlingResources)
|
private val mockingNetworkInterceptor = MockingNetworkInterceptor(idlingResources)
|
||||||
|
|
||||||
lateinit var database: AppDatabase
|
lateinit var database: AppDatabase
|
||||||
lateinit var locationProvider: MockLocationProvider
|
private val locationProvider: MockLocationProvider = MockLocationProvider()
|
||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
@@ -38,7 +38,6 @@ class TestAppClass : AtlasApp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun createLocationModule(): LocationProvider {
|
override fun createLocationModule(): LocationProvider {
|
||||||
locationProvider = MockLocationProvider()
|
|
||||||
return locationProvider
|
return locationProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.appttude.h_mal.atlas_weather.robot
|
||||||
|
|
||||||
|
import com.appttude.h_mal.atlas_weather.BaseTestRobot
|
||||||
|
import com.appttude.h_mal.atlas_weather.R
|
||||||
|
|
||||||
|
fun furtherInfoScreen(func: FurtherInfoScreen.() -> Unit) = FurtherInfoScreen().apply { func() }
|
||||||
|
class FurtherInfoScreen : BaseTestRobot() {
|
||||||
|
fun verifyMaxTemperature(temperature: Int) =
|
||||||
|
matchText(R.id.maxtemp, StringBuilder().append(temperature).append("°").toString())
|
||||||
|
fun verifyAverageTemperature(temperature: Int) =
|
||||||
|
matchText(R.id.averagetemp, StringBuilder().append(temperature).append("°").toString())
|
||||||
|
fun verifyMinTemperature(temperature: Int) =
|
||||||
|
matchText(R.id.minimumtemp, StringBuilder().append(temperature).append("°").toString())
|
||||||
|
|
||||||
|
fun verifyWindSpeed(speedText: String) =
|
||||||
|
matchText(R.id.windtext, speedText)
|
||||||
|
|
||||||
|
fun verifyHumidity(humidity: Int) =
|
||||||
|
matchText(R.id.humiditytext, humidity.toString())
|
||||||
|
fun verifyPrecipitation(precipitation: Int) =
|
||||||
|
matchText(R.id.preciptext, precipitation.toString())
|
||||||
|
|
||||||
|
fun verifyCloudCoverage(coverage: Int) =
|
||||||
|
matchText(R.id.cloudtext, coverage.toString())
|
||||||
|
|
||||||
|
fun verifyUvIndex(uv: Int) =
|
||||||
|
matchText(R.id.uvtext, uv.toString())
|
||||||
|
fun verifySunrise(sunrise: String) =
|
||||||
|
matchText(R.id.sunrisetext, sunrise)
|
||||||
|
fun verifySunset(sunset: String) =
|
||||||
|
matchText(R.id.sunsettext, sunset)
|
||||||
|
|
||||||
|
fun refresh() = pullToRefresh(R.id.swipe_refresh)
|
||||||
|
fun isDisplayed() = matchViewWaitFor(R.id.maxtemp)
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.appttude.h_mal.atlas_weather.robot
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView.ViewHolder
|
||||||
|
import androidx.test.espresso.Espresso.onView
|
||||||
|
import androidx.test.espresso.action.ViewActions.click
|
||||||
|
import androidx.test.espresso.assertion.ViewAssertions
|
||||||
|
import androidx.test.espresso.contrib.RecyclerViewActions
|
||||||
|
import androidx.test.espresso.matcher.RootMatchers.isDialog
|
||||||
|
import androidx.test.espresso.matcher.ViewMatchers
|
||||||
|
import androidx.test.espresso.matcher.ViewMatchers.withId
|
||||||
|
import androidx.test.espresso.matcher.ViewMatchers.withText
|
||||||
|
import com.appttude.h_mal.atlas_weather.BaseTestRobot
|
||||||
|
import com.appttude.h_mal.atlas_weather.R
|
||||||
|
import com.appttude.h_mal.atlas_weather.helpers.EspressoHelper.waitForView
|
||||||
|
import com.appttude.h_mal.atlas_weather.model.types.UnitType
|
||||||
|
|
||||||
|
|
||||||
|
fun settingsScreen(func: SettingsScreen.() -> Unit) = SettingsScreen().apply { func() }
|
||||||
|
class SettingsScreen : BaseTestRobot() {
|
||||||
|
|
||||||
|
fun selectWeatherUnits(unitType: UnitType) {
|
||||||
|
onView(withId(androidx.preference.R.id.recycler_view))
|
||||||
|
.perform(
|
||||||
|
RecyclerViewActions.actionOnItem<ViewHolder>(
|
||||||
|
ViewMatchers.hasDescendant(withText(R.string.weather_units)),
|
||||||
|
click()))
|
||||||
|
val label = when (unitType) {
|
||||||
|
UnitType.METRIC -> "Metric"
|
||||||
|
UnitType.IMPERIAL -> "Imperial"
|
||||||
|
}
|
||||||
|
|
||||||
|
onView(withText(label))
|
||||||
|
.inRoot(isDialog())
|
||||||
|
.check(ViewAssertions.matches(ViewMatchers.isDisplayed()))
|
||||||
|
.perform(click())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun verifyCurrentTemperature(temperature: Int) =
|
||||||
|
matchText(R.id.temp_main_4, temperature.toString())
|
||||||
|
|
||||||
|
fun verifyCurrentLocation(location: String) = matchText(R.id.location_main_4, location)
|
||||||
|
fun refresh() = pullToRefresh(R.id.swipe_refresh)
|
||||||
|
|
||||||
|
fun verifyUnableToRetrieve() {
|
||||||
|
matchText(R.id.header_text, R.string.retrieve_warning)
|
||||||
|
matchText(R.id.body_text, R.string.empty_retrieve_warning)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun isDisplayed() {
|
||||||
|
waitForView(
|
||||||
|
withText("Metric")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.appttude.h_mal.atlas_weather.robot
|
||||||
|
|
||||||
|
import com.appttude.h_mal.atlas_weather.BaseTestRobot
|
||||||
|
import com.appttude.h_mal.atlas_weather.R
|
||||||
|
import com.appttude.h_mal.atlas_weather.ui.home.adapter.forecastDaily.ViewHolderForecastDaily
|
||||||
|
|
||||||
|
fun weatherScreen(func: WeatherScreen.() -> Unit) = WeatherScreen().apply { func() }
|
||||||
|
class WeatherScreen : BaseTestRobot() {
|
||||||
|
fun verifyCurrentTemperature(temperature: Int) =
|
||||||
|
matchText(R.id.temp_main_4, temperature.toString())
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
fun verifyUnableToRetrieve() {
|
||||||
|
matchText(R.id.header_text, R.string.retrieve_warning)
|
||||||
|
matchText(R.id.body_text, R.string.empty_retrieve_warning)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun tapDayInformationByPosition(position: Int) {
|
||||||
|
clickSubViewInRecycler<ViewHolderForecastDaily>(R.id.forecast_listview, position)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.appttude.h_mal.atlas_weather.snapshot
|
||||||
|
|
||||||
|
|
||||||
|
import android.annotation.TargetApi
|
||||||
|
import androidx.test.filters.SmallTest
|
||||||
|
import com.appttude.h_mal.atlas_weather.BaseTest
|
||||||
|
import com.appttude.h_mal.atlas_weather.ui.MainActivity
|
||||||
|
import com.appttude.h_mal.atlas_weather.utils.Stubs
|
||||||
|
import com.appttude.h_mal.atlas_weather.robot.furtherInfoScreen
|
||||||
|
import com.appttude.h_mal.atlas_weather.robot.settingsScreen
|
||||||
|
import com.appttude.h_mal.atlas_weather.robot.weatherScreen
|
||||||
|
import org.junit.Test
|
||||||
|
import tools.fastlane.screengrab.Screengrab
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
|
@TargetApi(27)
|
||||||
|
class SnapshotCaptureTest : BaseTest<MainActivity>(MainActivity::class.java) {
|
||||||
|
|
||||||
|
override fun beforeLaunch() {
|
||||||
|
stubEndpoint("https://api.openweathermap.org/data/2.5/onecall", Stubs.Metric)
|
||||||
|
stubLocation("London", 51.51, -0.13)
|
||||||
|
clearPrefs()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun homeAndFurtherInfoPageCapture() {
|
||||||
|
weatherScreen {
|
||||||
|
isDisplayed()
|
||||||
|
Screengrab.screenshot("HomeScreen")
|
||||||
|
tapDayInformationByPosition(4)
|
||||||
|
}
|
||||||
|
furtherInfoScreen {
|
||||||
|
isDisplayed()
|
||||||
|
Screengrab.screenshot("FurtherInfoScreen")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun settingsPageCapture() {
|
||||||
|
weatherScreen {
|
||||||
|
isDisplayed()
|
||||||
|
openMenuItem()
|
||||||
|
}
|
||||||
|
settingsScreen {
|
||||||
|
stubEndpoint("https://api.openweathermap.org/data/2.5/onecall", Stubs.Imperial)
|
||||||
|
Screengrab.screenshot("SettingsScreen")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,7 +21,7 @@ class TestAppClass : MonoApp() {
|
|||||||
private val mockingNetworkInterceptor = MockingNetworkInterceptor(idlingResources)
|
private val mockingNetworkInterceptor = MockingNetworkInterceptor(idlingResources)
|
||||||
|
|
||||||
lateinit var database: AppDatabase
|
lateinit var database: AppDatabase
|
||||||
lateinit var locationProvider: MockLocationProvider
|
private val locationProvider: MockLocationProvider = MockLocationProvider()
|
||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
@@ -38,7 +38,6 @@ class TestAppClass : MonoApp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun createLocationModule(): LocationProvider {
|
override fun createLocationModule(): LocationProvider {
|
||||||
locationProvider = MockLocationProvider()
|
|
||||||
return locationProvider
|
return locationProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.appttude.h_mal.atlas_weather.snapshot
|
||||||
|
|
||||||
|
|
||||||
|
import android.annotation.TargetApi
|
||||||
|
import androidx.test.filters.SmallTest
|
||||||
|
import com.appttude.h_mal.atlas_weather.BaseTest
|
||||||
|
import com.appttude.h_mal.atlas_weather.ui.MainActivity
|
||||||
|
import com.appttude.h_mal.atlas_weather.utils.Stubs
|
||||||
|
import com.appttude.h_mal.monoWeather.robot.furtherInfoScreen
|
||||||
|
import com.appttude.h_mal.monoWeather.robot.settingsScreen
|
||||||
|
import com.appttude.h_mal.monoWeather.robot.weatherScreen
|
||||||
|
import org.junit.Test
|
||||||
|
import tools.fastlane.screengrab.Screengrab
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
|
@TargetApi(27)
|
||||||
|
class SnapshotCaptureTest : BaseTest<MainActivity>(MainActivity::class.java) {
|
||||||
|
|
||||||
|
override fun beforeLaunch() {
|
||||||
|
stubEndpoint("https://api.openweathermap.org/data/2.5/onecall", Stubs.Metric)
|
||||||
|
stubLocation("London", 51.51, -0.13)
|
||||||
|
clearPrefs()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun homeAndFurtherInfoPageCapture() {
|
||||||
|
weatherScreen {
|
||||||
|
isDisplayed()
|
||||||
|
Screengrab.screenshot("HomeScreen")
|
||||||
|
tapDayInformationByPosition(4)
|
||||||
|
}
|
||||||
|
furtherInfoScreen {
|
||||||
|
isDisplayed()
|
||||||
|
Screengrab.screenshot("FurtherInfoScreen")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun settingsPageCapture() {
|
||||||
|
weatherScreen {
|
||||||
|
isDisplayed()
|
||||||
|
openMenuItem()
|
||||||
|
}
|
||||||
|
settingsScreen {
|
||||||
|
stubEndpoint("https://api.openweathermap.org/data/2.5/onecall", Stubs.Imperial)
|
||||||
|
Screengrab.screenshot("SettingsScreen")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,7 +24,6 @@ class HomePageUITest : BaseTest<MainActivity>(MainActivity::class.java) {
|
|||||||
isDisplayed()
|
isDisplayed()
|
||||||
verifyCurrentTemperature(2)
|
verifyCurrentTemperature(2)
|
||||||
verifyCurrentLocation("Mock Location")
|
verifyCurrentLocation("Mock Location")
|
||||||
Screengrab.screenshot("HomeScreen")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +39,6 @@ class HomePageUITest : BaseTest<MainActivity>(MainActivity::class.java) {
|
|||||||
isDisplayed()
|
isDisplayed()
|
||||||
verifyMaxTemperature(12)
|
verifyMaxTemperature(12)
|
||||||
verifyAverageTemperature(9)
|
verifyAverageTemperature(9)
|
||||||
Screengrab.screenshot("FurtherInfoScreen")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -57,7 +55,6 @@ class HomePageUITest : BaseTest<MainActivity>(MainActivity::class.java) {
|
|||||||
settingsScreen {
|
settingsScreen {
|
||||||
selectWeatherUnits(UnitType.IMPERIAL)
|
selectWeatherUnits(UnitType.IMPERIAL)
|
||||||
goBack()
|
goBack()
|
||||||
Screengrab.screenshot("SettingsScreen")
|
|
||||||
}
|
}
|
||||||
weatherScreen {
|
weatherScreen {
|
||||||
isDisplayed()
|
isDisplayed()
|
||||||
|
|||||||
@@ -1,320 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_margin="12dp"
|
|
||||||
android:layout_weight="2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
style="@style/icon_style__further_details"
|
|
||||||
android:src="@drawable/somethingnew" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="2">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="3"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:text="@string/max" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/maxtemp"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="3"
|
|
||||||
tools:text="11" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:text="@string/average" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/averagetemp"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="3"
|
|
||||||
tools:text="11" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:text="@string/min" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/minimumtemp"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="3"
|
|
||||||
tools:text="11" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_margin="12dp"
|
|
||||||
android:layout_weight="2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
style="@style/icon_style__further_details"
|
|
||||||
android:src="@drawable/breeze" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="2">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:layout_weight="3">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:text="Wind: " />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/windtext"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="3"
|
|
||||||
android:text="7mph" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_margin="12dp"
|
|
||||||
android:layout_weight="2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
style="@style/icon_style__further_details"
|
|
||||||
android:src="@drawable/water_drop" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="2">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="3"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:text="Humidity: " />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/humiditytext"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="3"
|
|
||||||
android:text="85%" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:text="Precip: " />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/preciptext"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="3"
|
|
||||||
android:text="11mm" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_margin="12dp"
|
|
||||||
android:layout_weight="2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
style="@style/icon_style__further_details"
|
|
||||||
android:src="@drawable/sunrise" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="2">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="3"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:text="UV: " />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/uvtext"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="3"
|
|
||||||
android:text="7" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:text="Sunrise:" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/sunrisetext"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="3"
|
|
||||||
android:text="05:30am" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:text="Sunset:" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/sunsettext"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="3"
|
|
||||||
android:text="06:12pm" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</FrameLayout>
|
|
||||||
@@ -58,5 +58,5 @@
|
|||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/settings_fragment"
|
android:id="@+id/settings_fragment"
|
||||||
android:name="com.appttude.h_mal.atlas_weather.ui.settings.SettingsFragment"
|
android:name="com.appttude.h_mal.atlas_weather.ui.settings.SettingsFragment"
|
||||||
android:label="SettingsFragment" />
|
android:label="Settings" />
|
||||||
</navigation>
|
</navigation>
|
||||||
@@ -58,6 +58,6 @@
|
|||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/settings_fragment"
|
android:id="@+id/settings_fragment"
|
||||||
android:name="com.appttude.h_mal.monoWeather.ui.settings.SettingsFragment"
|
android:name="com.appttude.h_mal.monoWeather.ui.settings.SettingsFragment"
|
||||||
android:label="SettingsFragment" />
|
android:label="Settings" />
|
||||||
|
|
||||||
</navigation>
|
</navigation>
|
||||||
@@ -43,7 +43,7 @@ platform :android do
|
|||||||
package_name: "com.appttude.h_mal.atlas_weather")
|
package_name: "com.appttude.h_mal.atlas_weather")
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Capture screenshots"
|
desc "Capture screenshots on MonoWeather"
|
||||||
lane :screenGrabMonoWeather do
|
lane :screenGrabMonoWeather do
|
||||||
build_android_app(
|
build_android_app(
|
||||||
task: 'assemble',
|
task: 'assemble',
|
||||||
@@ -61,6 +61,29 @@ platform :android do
|
|||||||
app_apk_path: "app/build/outputs/apk/monoWeather/debug/app-monoWeather-debug.apk",
|
app_apk_path: "app/build/outputs/apk/monoWeather/debug/app-monoWeather-debug.apk",
|
||||||
tests_apk_path: "app/build/outputs/apk/androidTest/monoWeather/debug/app-monoWeather-debug-androidTest.apk",
|
tests_apk_path: "app/build/outputs/apk/androidTest/monoWeather/debug/app-monoWeather-debug-androidTest.apk",
|
||||||
test_instrumentation_runner: "com.appttude.h_mal.atlas_weather.application.TestRunner",
|
test_instrumentation_runner: "com.appttude.h_mal.atlas_weather.application.TestRunner",
|
||||||
|
use_tests_in_packages: "com.appttude.h_mal.atlas_weather.snapshot"
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Capture screenshots on AtlasWeather"
|
||||||
|
lane :screenGrabAtlasWeather do
|
||||||
|
build_android_app(
|
||||||
|
task: 'assemble',
|
||||||
|
build_type: 'Debug',
|
||||||
|
flavor: 'AtlasWeather',
|
||||||
|
)
|
||||||
|
build_android_app(
|
||||||
|
task: 'assemble',
|
||||||
|
build_type: 'AndroidTest',
|
||||||
|
flavor: 'AtlasWeather',
|
||||||
|
)
|
||||||
|
screengrab(
|
||||||
|
app_package_name: "com.appttude.h_mal.atlas_weather",
|
||||||
|
locales: ["en-UK"],
|
||||||
|
app_apk_path: "app/build/outputs/apk/atlasWeather/debug/app-atlasWeather-debug.apk",
|
||||||
|
tests_apk_path: "app/build/outputs/apk/androidTest/atlasWeather/debug/app-atlasWeather-debug-androidTest.apk",
|
||||||
|
test_instrumentation_runner: "com.appttude.h_mal.atlas_weather.application.TestRunner",
|
||||||
|
use_tests_in_packages: "com.appttude.h_mal.atlas_weather.snapshot"
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
56
fastlane/README.md
Normal file
56
fastlane/README.md
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
fastlane documentation
|
||||||
|
----
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
Make sure you have the latest version of the Xcode command line tools installed:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
xcode-select --install
|
||||||
|
```
|
||||||
|
|
||||||
|
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
|
||||||
|
|
||||||
|
# Available Actions
|
||||||
|
|
||||||
|
## Android
|
||||||
|
|
||||||
|
### android deployMonoWeather
|
||||||
|
|
||||||
|
```sh
|
||||||
|
[bundle exec] fastlane android deployMonoWeather
|
||||||
|
```
|
||||||
|
|
||||||
|
Deploy a new Mono Weather version to the Google Play
|
||||||
|
|
||||||
|
### android deployAtlasWeather
|
||||||
|
|
||||||
|
```sh
|
||||||
|
[bundle exec] fastlane android deployAtlasWeather
|
||||||
|
```
|
||||||
|
|
||||||
|
Deploy a new Atlas Weather version to the Google Play
|
||||||
|
|
||||||
|
### android screenGrabMonoWeather
|
||||||
|
|
||||||
|
```sh
|
||||||
|
[bundle exec] fastlane android screenGrabMonoWeather
|
||||||
|
```
|
||||||
|
|
||||||
|
Capture screenshots on MonoWeather
|
||||||
|
|
||||||
|
### android screenGrabAtlasWeather
|
||||||
|
|
||||||
|
```sh
|
||||||
|
[bundle exec] fastlane android screenGrabAtlasWeather
|
||||||
|
```
|
||||||
|
|
||||||
|
Capture screenshots on AtlasWeather
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
|
||||||
|
|
||||||
|
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
|
||||||
|
|
||||||
|
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
|
||||||
12
readme.md
12
readme.md
@@ -15,13 +15,13 @@ Weather-apps contains two weather apps - Atlas weather and Mono weather. They ar
|
|||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
### Atlas Weather
|
### Atlas Weather
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
### Mono Weather
|
### Mono Weather
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
BIN
screenshots/atlas/forecast.png
Normal file
BIN
screenshots/atlas/forecast.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
BIN
screenshots/atlas/home.png
Normal file
BIN
screenshots/atlas/home.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
BIN
screenshots/atlas/settings.png
Normal file
BIN
screenshots/atlas/settings.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
BIN
screenshots/mono/forecast.png
Normal file
BIN
screenshots/mono/forecast.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
screenshots/mono/home.png
Normal file
BIN
screenshots/mono/home.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
BIN
screenshots/mono/settings.png
Normal file
BIN
screenshots/mono/settings.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user