Fix Android instrumented test determinism and asset paths

This commit is contained in:
Alinson S. Xavier 2026-04-11 11:11:21 -05:00
parent 453f4ca3f9
commit 0ca4d46c43
3 changed files with 8 additions and 3 deletions

View File

@ -44,6 +44,12 @@ android {
namespace = "org.isoron.uhabits"
compileSdk = 36
sourceSets {
getByName("main") {
assets.srcDirs("src/main/assets", "../uhabits-core/assets/main")
}
}
defaultConfig {
versionCode = 20301
versionName = "2.3.1"

View File

@ -30,7 +30,6 @@ import junit.framework.TestCase
import org.hamcrest.CoreMatchers.hasItems
import org.hamcrest.MatcherAssert.assertThat
import org.isoron.platform.time.LocalDate
import org.isoron.platform.time.computeToday
import org.isoron.platform.time.getToday
import org.isoron.platform.time.setToday
import org.isoron.uhabits.core.models.HabitList
@ -85,7 +84,7 @@ abstract class BaseAndroidTest : TestCase() {
prefs = appComponent.preferences
habitList = appComponent.habitList
taskRunner = appComponent.taskRunner
setToday(computeToday(appComponent.preferences.midnightDelayHours, 0))
setToday(LocalDate(2015, 1, 25))
modelFactory = appComponent.modelFactory
prefs.clear()
fixtures = HabitFixtures(modelFactory, habitList)

View File

@ -48,7 +48,7 @@ class FrequencyCardViewTest : BaseViewTest() {
view.setState(
FrequencyCardPresenter.buildState(
habit = habit,
firstWeekday = DayOfWeek.SUNDAY,
firstWeekday = DayOfWeek.SATURDAY,
theme = LightTheme()
)
)