Lint fixes (#19)

- Code inspection
 - Redundant resources removed
 - Resources moved the corresponding flavours
 - Deprecated dependencies upgraded
 - lint changes
 - circleci updated to capture screenshot
This commit is contained in:
2023-08-09 00:21:15 +01:00
committed by GitHub
parent baabebd40d
commit ce1d13e630
177 changed files with 1393 additions and 1265 deletions

View File

@@ -8,7 +8,7 @@ import androidx.test.espresso.matcher.ViewMatchers
import com.appttude.h_mal.atlas_weather.BaseTest
import com.appttude.h_mal.atlas_weather.ui.MainActivity
open class MonoBaseTest: BaseTest<MainActivity>(MainActivity::class.java) {
open class MonoBaseTest : BaseTest<MainActivity>(MainActivity::class.java) {
override fun afterLaunch() {
// Dismiss dialog on start up

View File

@@ -1,11 +1,14 @@
package com.appttude.h_mal.monoWeather.robot
import com.appttude.h_mal.atlas_weather.R
import com.appttude.h_mal.atlas_weather.BaseTestRobot
import com.appttude.h_mal.atlas_weather.R
fun homeScreen(func: HomeScreenRobot.() -> Unit) = HomeScreenRobot().apply { func() }
class HomeScreenRobot : BaseTestRobot() {
fun verifyCurrentTemperature(temperature: Int) = matchText(R.id.temp_main_4, temperature.toString())
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)
}

View File

@@ -1,7 +1,7 @@
package com.appttude.h_mal.monoWeather.robot
import com.appttude.h_mal.atlas_weather.R
import com.appttude.h_mal.atlas_weather.BaseTestRobot
import com.appttude.h_mal.atlas_weather.R
fun widgetPermissionScreen(func: WidgetPermissionScreenRobot.() -> Unit) =
WidgetPermissionScreenRobot().apply { func() }

View File

@@ -1,9 +1,9 @@
package com.appttude.h_mal.monoWeather.tests
import com.appttude.h_mal.monoWeather.robot.homeScreen
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
class HomePageUITest : MonoBaseTest() {
@@ -15,6 +15,7 @@ class HomePageUITest : MonoBaseTest() {
@Test
fun loadApp_validWeatherResponse_returnsValidPage() {
homeScreen {
isDisplayed()
verifyCurrentTemperature(2)
verifyCurrentLocation("Mock Location")
}

View File

@@ -1,9 +1,7 @@
package com.appttude.h_mal.monoWeather.tests
import android.appwidget.AppWidgetManager
import android.content.Intent
import android.os.Bundle
import androidx.test.rule.ActivityTestRule
import com.appttude.h_mal.atlas_weather.BaseTest
import com.appttude.h_mal.monoWeather.robot.widgetPermissionScreen
import com.appttude.h_mal.monoWeather.ui.widget.WidgetLocationPermissionActivity