willowtreeapps / willowtreeapps/vocable-android
Flaky EditCategoriesViewModel tests + undiagnosed Categories and Phrases bug
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 127
- Forks
- 21
- Avg merge
- 16m
- Merged PRs (30d)
- 4
Description
Describe the bug
The 4 tests marked as flaky in EditCategoriesViewModelTest.kt have yet to be resolved. They expose unresolved/un-investigated bugs within the EditCategoriesViewModel.refreshCategories() function. They can cause issues with the "Categories and Phrases" page in Settings after the user adds a new custom Category.
To Reproduce
There is no known way to replicate the bug. I have only been able to produce it once. The majority of the time the bug is not present.
Expected behavior
See #532 for more details on the expected behaviour.
Actual Behavior
Adding a new category will not consistently flip the Categories and Settings page to the newly added category. Occasionally the page will flip correctly. But more often than not, it doesn't. Note, however, that this bug is very hard to reproduce, and most of the time the actual behaviour is correct.
Smartphone (please complete the following information):
- Device: Pixel 4
- OS: Android 12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the four flaky tests in EditCategoriesViewModelTest.kt and inspect EditCategoriesViewModel.refreshCategories(). Compare the expected behavior with issue #532, then investigate the intermittent category-selection behavior after adding a custom category. Done means the flaky tests and the Categories and Phrases page behavior are reliably corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100