Skip to content

IDE-299 Rewrite LoadProjectAIExtensionSettingsTest from End2End-test to Integration-test#5122

Open
Kale2605 wants to merge 3 commits intoCatrobat:developfrom
Kale2605:load_settings_test
Open

IDE-299 Rewrite LoadProjectAIExtensionSettingsTest from End2End-test to Integration-test#5122
Kale2605 wants to merge 3 commits intoCatrobat:developfrom
Kale2605:load_settings_test

Conversation

@Kale2605
Copy link
Copy Markdown
Contributor

@Kale2605 Kale2605 commented Nov 26, 2025

Rewrite LoadProjectAIExtensionSettingsTest from End2End-test to Integration-test.
https://catrobat.atlassian.net/browse/IDE-299?atlOrigin=eyJpIjoiMzJmMDE3MTFjZTJmNDgyZjhiM2M2NWYzZTdlOGFjZWYiLCJwIjoiaiJ9

LoadProjectAIExtensionSettingsTest uses ProjectManager instead of espresso navigation.

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

Prior: used espresso
Now: save and load project and check flags (no ui)
@sonarqubecloud
Copy link
Copy Markdown

@reichli reichli added the Active Member Tickets that are assigned to members that are still currently active label Dec 25, 2025
Copy link
Copy Markdown
Member

@harshsomankar123-tech harshsomankar123-tech left a comment

Choose a reason for hiding this comment

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

@Kale2605 Thanks for refactoring this test! Moving from Espresso to an integration test really improves CI speed and stability.Plz see reviewed changes

@@ -0,0 +1,56 @@
/*
* Catroid: An on-device visual programming system for Android devices
* Copyright (C) 2010-2025 The Catrobat Team
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.

Change Copyright Year To 2026

projectManager.currentProject = project
projectManager.currentSprite = sprite
projectManager.currentlyEditedScene = project.defaultScene
XstreamSerializer.getInstance().saveProject(project)
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.

This saveProject call is redundant. The test testSettingsBeforeAndAfterLoadProject already calls saveProject after adding the specific brick, so saving here just adds unnecessary I/O.

private var file: File = File("")

@get:Rule
var baseActivityTestRule: BaseActivityTestRule<MainMenuActivity> = BaseActivityTestRule(
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.

Since we are no longer launching an activity in this integration test, this baseActivityTestRule is unused and should be removed, along with its imports (e.g., MainMenuActivity and BaseActivityTestRule)

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.

This asset was added but is not referenced in the test code. Is this a leftover from a previous iteration? If it's not needed for the test to pass, it should be removed.

@@ -1,3 +1,3 @@
/*
* Catroid: An on-device visual programming system for Android devices
* Copyright (C) 2010-2025 The Catrobat Team
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.

Here also

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