Skip to content
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

test: [ANDROAPP-6609] Refactor program rules UI form's test to integration tests #3651

Merged
merged 3 commits into from
May 24, 2024

Conversation

ferdyrod
Copy link
Contributor

Description

Please include a summary of the change and include the related jira issue if it exists.

[ jira issue ](https://dhis2.atlassian.net/browse/ANDROAPP-

Solution description

If this PR is a fix include a brief description on how the issue is solved.

Covered unit test cases

Describe the tests that you ran to verify your changes.

Where did you test this issue?

  • Smartphone Emulator
  • Tablet Emulator
  • Smartphone
  • Tablet

Which Android versions did you test this issue?

  • 4.4
  • 5.X - 6.X
  • 7.X
  • 8.X
  • 9.X - 10.X
  • 11.X - 13.X
  • Other

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code


testOptions {
unitTests {
isReturnDefaultValues = true
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was added because there was a error saying that the method "isEmpty()"in the Android's TextUtils class was not being mocked. Even though that method is not invoked anywhere in the code. The error happened when the method FormViewModel::processCalculatedItems() called the FormCountingIdlingResource.increment() method.

Adding this configuration fixed this problem

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@@ -146,12 +145,13 @@ class FilterTest : BaseTest() {
eventWithoutRegistrationRobot(composeTestRule) {
clickOnEventAtPosition(0)
}
formRobot(composeTestRule) {
// Commented because FormRobot class wah eliminated as FormTest was also eliminated
/*formRobot(composeTestRule) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if this is no longer needed maybe we can remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so, because this test is going to be looked at at some point. So it's better to leave it as it is so when someone does look into this, knows how the tests really is coded.

@ferdyrod ferdyrod merged commit df6e294 into develop May 24, 2024
4 checks passed
@ferdyrod ferdyrod deleted the ANDROAPP-6009 branch May 24, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants