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"
|
||||
compileSdk = 36
|
||||
|
||||
sourceSets {
|
||||
getByName("main") {
|
||||
assets.srcDirs("src/main/assets", "../uhabits-core/assets/main")
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
versionCode = 20301
|
||||
versionName = "2.3.1"
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -48,7 +48,7 @@ class FrequencyCardViewTest : BaseViewTest() {
|
||||
view.setState(
|
||||
FrequencyCardPresenter.buildState(
|
||||
habit = habit,
|
||||
firstWeekday = DayOfWeek.SUNDAY,
|
||||
firstWeekday = DayOfWeek.SATURDAY,
|
||||
theme = LightTheme()
|
||||
)
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user