CATROID-1658 Fix failing test ActionBarUndoSpinnerTest.testUndoSpinnerAction#5215
Conversation
|
@hannesweilharter IMO, could you please refactor this test file to Kotlin as well? Since we are currently refactoring many files, and you are already working on fixing the failing tests, I think it would be good if we also migrated this one during the process. |
c8e1171 to
5ddd825
Compare
harshsomankar123-tech
left a comment
There was a problem hiding this comment.
@hannesweilharter Thanks! LGTM
reichli
left a comment
There was a problem hiding this comment.
Hi!
Looks good - thanks for the fix! (and the refactor)
I just found one little nitpick though that should be easy to address. After that we can merge it :)
|
|
||
| @Test | ||
| fun testUndoSpinnerActionVisible() { | ||
| Espresso.onView(ViewMatchers.withId(R.id.menu_undo)).check(ViewAssertions.doesNotExist()) |
There was a problem hiding this comment.
Could you please import the functions like Espresso.onView directly instead of the whole package?
Then we could get rid of all those prefixes Espresso... , ViewMatchers... like in the old java-version of this test.
|
reichli
left a comment
There was a problem hiding this comment.
Looks good - thank you for the fix!



Instead of mocking the File class, real sound and look files are generated. This seems to fix the failing testcase.
Additionally, the file was refactored to Kotlin
https://catrobat.atlassian.net/browse/CATROID-1658
Your checklist for this pull request
Please review the contributing guidelines and wiki pages of this repository.