Skip to content

CATROID-1658 Fix failing test ActionBarUndoSpinnerTest.testUndoSpinnerAction#5215

Merged
reichli merged 3 commits into
Catrobat:developfrom
hannesweilharter:CATROID-1658
May 27, 2026
Merged

CATROID-1658 Fix failing test ActionBarUndoSpinnerTest.testUndoSpinnerAction#5215
reichli merged 3 commits into
Catrobat:developfrom
hannesweilharter:CATROID-1658

Conversation

@hannesweilharter

@hannesweilharter hannesweilharter commented May 15, 2026

Copy link
Copy Markdown
Contributor

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.

  • Include the name of the Jira ticket in the PR’s title
  • Include a summary of the changes plus the relevant context
  • Choose the proper base branch (develop)
  • Confirm that the changes follow the project’s coding guidelines
  • Verify that the changes generate no compiler or linter warnings
  • Perform a self-review of the changes
  • Verify to commit no other files than the intentionally changed ones
  • Include reasonable and readable tests verifying the added or changed behavior
  • Confirm that new and existing unit tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Stick to the project’s gitflow workflow
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Post a message in the catroid-stage or catroid-ide Slack channel and ask for a code reviewer

@hannesweilharter hannesweilharter marked this pull request as ready for review May 15, 2026 13:34
@harshsomankar123-tech

Copy link
Copy Markdown
Member

@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.
Thanks!

@harshsomankar123-tech harshsomankar123-tech added the Active Member Tickets that are assigned to members that are still currently active label May 15, 2026

@harshsomankar123-tech harshsomankar123-tech left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hannesweilharter Thanks! LGTM

@reichli reichli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sonarqubecloud

Copy link
Copy Markdown

@reichli reichli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thank you for the fix!

@reichli reichli merged commit 5474b09 into Catrobat:develop May 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Active Member Tickets that are assigned to members that are still currently active

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants