New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cleanup]: Add Tests to the code (@NeedsTest
)
#13283
Comments
please assign this issue to me |
Multiple people can work on this issue, please pick a test and let us know! |
I suggest clarifying
|
I am intrested to look into this issue ,Please assign this issue to me |
|
Question: are unit tests just preferred over UI tests or is it a hard requirement? It seems to my Android-newbie eye that a lot of @NeedsTest annotations request a test that validates some UI flow, testable with Espresso. Examples: https://github.com/ankidroid/Anki-Android/blob/main/AnkiDroid/src/main/java/com/ichi2/anki/InitialActivity.kt#L188-L194 Or am I misunderstanding something? |
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically |
…4291) * refactor: separate logic from dependencies by extracting easy to test class FlagToDisplay * test: cover FLAG_NONE case * test: Resolve @NeedsTest("is hidden if flag is on app bar") * test: Resolve @NeedsTest("is not hidden if flag is not on app bar") * test: Resolve @NeedsTest("is not hidden if flag is on app bar and fullscreen is enabled") * test: Remove redundant test, as already covered by other tests * refactor: simplify now tested logic * test: remove @RunWith to fix Roboelectric Exception * refactor: add more meaning to field by renaming to actualFlag * refactor: revert accidental auto formatting * refactor: add own copyright --------- Co-authored-by: Paul Tietz <pati@aprixon.de>
Hey :), I've written a test for:
to cover that inverse animations are being correctly assigned from gestures. |
…er.kt (ankidroid#14291) * refactor: separate logic from dependencies by extracting easy to test class FlagToDisplay * test: cover FLAG_NONE case * test: Resolve @NeedsTest("is hidden if flag is on app bar") * test: Resolve @NeedsTest("is not hidden if flag is not on app bar") * test: Resolve @NeedsTest("is not hidden if flag is on app bar and fullscreen is enabled") * test: Remove redundant test, as already covered by other tests * refactor: simplify now tested logic * test: remove @RunWith to fix Roboelectric Exception * refactor: add more meaning to field by renaming to actualFlag * refactor: revert accidental auto formatting * refactor: add own copyright --------- Co-authored-by: Paul Tietz <pati@aprixon.de>
…er.kt (ankidroid#14291) * refactor: separate logic from dependencies by extracting easy to test class FlagToDisplay * test: cover FLAG_NONE case * test: Resolve @NeedsTest("is hidden if flag is on app bar") * test: Resolve @NeedsTest("is not hidden if flag is not on app bar") * test: Resolve @NeedsTest("is not hidden if flag is on app bar and fullscreen is enabled") * test: Remove redundant test, as already covered by other tests * refactor: simplify now tested logic * test: remove @RunWith to fix Roboelectric Exception * refactor: add more meaning to field by renaming to actualFlag * refactor: revert accidental auto formatting * refactor: add own copyright --------- Co-authored-by: Paul Tietz <pati@aprixon.de>
I'm working on |
I'm taking up this
|
Note
This issue does not need to be assigned to you before you work on it
A number of paths of the code have been identified as requiring automated testing.
Typically this is regression testing: if a bug has been found, then it's useful to have a unit test which would have failed due to the bug.
@NeedsTest
: https://github.com/ankidroid/Anki-Android/blob/main/AnkiDroid/src/main/java/com/ichi2/annotations/NeedsTest.kt/test
, not/androidTest
)The text was updated successfully, but these errors were encountered: