Closed david-allison closed 1 month ago
@xenonnn4w FYI
DeckPickerWidgetConfigTest > testLoadSavedPreferences FAILED
java.lang.AssertionError:
Expected: <1>
but: was <0>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
at com.ichi2.anki.widget.deckpicker.DeckPickerWidgetConfigTest.testLoadSavedPreferences(DeckPickerWidgetConfigTest.kt:108)
-- executing test "testLoadSavedPreferences"
D/ChangeManager: clearing 1 subscribers
I/Themes: Setting theme to LIGHT
I/AnkiDroidApp$onCreate: DeckPickerWidgetConfig::onCreate
I/ScopedStorageService: isLegacyStorage(): false
W/VirtualDeviceManager: Failed to retrieve virtual devices; no virtual device manager service.
D/Backend: Opening rust backend with lang=[en-US]
I/Collection: (Re)opening Database: C:\Users\RUNNER~1\AppData\Local\Temp\robolectric-DeckPickerWidgetConfigTest_testLoadSavedPreferences13350412591225695864\external-files\Android\data\com.ichi2.anki.debug\AnkiDroid\collection.anki2
I/AnkiActivity: finishWithAnimation DEFAULT
I/AnkiDroidApp$onCreate: DeckPickerWidgetConfig::onStart
I/AnkiDroidApp$onCreate: DeckPickerWidgetConfig::onResume
D/UsageAnalytics: sendAnalyticsScreenView(): DeckPickerWidgetConfig
D/UsageAnalytics: getOptIn() status: false
I/RobolectricTest: closeCollection: RobolectricTest: End
I/Collection: Collection closed
-- completed test "testLoadSavedPreferences"
Two issues:
updateFabVisibility
launches a task under lifecycleScope
, which is not cancelled on collection closefinish
after the task is launched, rather than before it.