Fix Android instrumented test determinism and asset paths
This commit is contained in:
parent
453f4ca3f9
commit
0ca4d46c43
@ -44,6 +44,12 @@ android {
|
|||||||
namespace = "org.isoron.uhabits"
|
namespace = "org.isoron.uhabits"
|
||||||
compileSdk = 36
|
compileSdk = 36
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
getByName("main") {
|
||||||
|
assets.srcDirs("src/main/assets", "../uhabits-core/assets/main")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
versionCode = 20301
|
versionCode = 20301
|
||||||
versionName = "2.3.1"
|
versionName = "2.3.1"
|
||||||
|
|||||||
@ -30,7 +30,6 @@ import junit.framework.TestCase
|
|||||||
import org.hamcrest.CoreMatchers.hasItems
|
import org.hamcrest.CoreMatchers.hasItems
|
||||||
import org.hamcrest.MatcherAssert.assertThat
|
import org.hamcrest.MatcherAssert.assertThat
|
||||||
import org.isoron.platform.time.LocalDate
|
import org.isoron.platform.time.LocalDate
|
||||||
import org.isoron.platform.time.computeToday
|
|
||||||
import org.isoron.platform.time.getToday
|
import org.isoron.platform.time.getToday
|
||||||
import org.isoron.platform.time.setToday
|
import org.isoron.platform.time.setToday
|
||||||
import org.isoron.uhabits.core.models.HabitList
|
import org.isoron.uhabits.core.models.HabitList
|
||||||
@ -85,7 +84,7 @@ abstract class BaseAndroidTest : TestCase() {
|
|||||||
prefs = appComponent.preferences
|
prefs = appComponent.preferences
|
||||||
habitList = appComponent.habitList
|
habitList = appComponent.habitList
|
||||||
taskRunner = appComponent.taskRunner
|
taskRunner = appComponent.taskRunner
|
||||||
setToday(computeToday(appComponent.preferences.midnightDelayHours, 0))
|
setToday(LocalDate(2015, 1, 25))
|
||||||
modelFactory = appComponent.modelFactory
|
modelFactory = appComponent.modelFactory
|
||||||
prefs.clear()
|
prefs.clear()
|
||||||
fixtures = HabitFixtures(modelFactory, habitList)
|
fixtures = HabitFixtures(modelFactory, habitList)
|
||||||
|
|||||||
@ -48,7 +48,7 @@ class FrequencyCardViewTest : BaseViewTest() {
|
|||||||
view.setState(
|
view.setState(
|
||||||
FrequencyCardPresenter.buildState(
|
FrequencyCardPresenter.buildState(
|
||||||
habit = habit,
|
habit = habit,
|
||||||
firstWeekday = DayOfWeek.SUNDAY,
|
firstWeekday = DayOfWeek.SATURDAY,
|
||||||
theme = LightTheme()
|
theme = LightTheme()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user