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

Removed the regression test package part3 #6295

Merged
merged 15 commits into from
Aug 29, 2024

Conversation

grzesiek2010
Copy link
Member

Why is this the best possible solution? Were any other approaches considered?

This is the third part of #5983 which contains commits 18-29

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

It doesn't require testing.

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • added any new strings with date formatting to DateFormatsTest
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010 grzesiek2010 marked this pull request as ready for review July 29, 2024 09:20
var copyFormChain: RuleChain = chain().around(rule)

@Test
fun bigForm_ShouldBeFilledSuccessfully() {
Copy link
Member

Choose a reason for hiding this comment

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

What's this actually checking?

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably that a big form can be loaded and used without crashes? @dbemke is that form (nigeria-wards) something you use for testing? Or maybe you have more info about this test it's TestCase18 NODK-244?

@@ -200,4 +200,16 @@ public void regularGroupThatWrapsARepeatableGroupShouldBeTreatedAsARegularOne()
.assertPath("Outer")
.assertNotRemovableGroup();
}

@Test
public void when_openHierarchyViewFromLastPage_should_mainGroupViewBeVisible() {
Copy link
Member

Choose a reason for hiding this comment

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

Does it matter that it's a repeat form?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think so but I'm not sure. Again @dbemke do you know anything about this test? It's TestCase30 NODK-244?

@Test
public void hierachyView_shouldNotChangeAfterScreenRotation() {
rule.startAtMainMenu()
.copyForm("repeat_group_form.xml")
Copy link
Member

Choose a reason for hiding this comment

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

Again does this need to be a repeat form? It feels like the test just needs any form where it can navigate somewhere in the hierarchy and just rotate once (rather than multiple times).

Copy link
Member Author

Choose a reason for hiding this comment

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

When it comes to rotating multiple times I agree but I guess a form with repeats was used on purpose. I think we might have wanted to test that after recreating the activity we are on the same level in the hierarchy which is not possible with simple forms.

@@ -227,4 +228,40 @@ public void hierachyView_shouldNotChangeAfterScreenRotation() {
.rotateToPortrait(new FormHierarchyPage("Repeat Group"))
.checkIfElementInHierarchyMatchesToText("Group Name", 0);
}

@Test
public void groups_shouldBeVisibleInHierarchyView() {
Copy link
Member

Choose a reason for hiding this comment

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

Could the length of this be reduced do you think?

Copy link
Member 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. I guess it was important here to use a form with nested repeats and add a few groups that make the test long. @dbemke again if you know anything about this test please let us know, it is TestCase28 NODK-244

}

@Test
fun app_ShouldNotCrash_whenFillingFormsWithErrors() {
Copy link
Member

Choose a reason for hiding this comment

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

I think we should break this into a test per form so we can describe the error type more clearly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in efe2c60. I think we can just keep two of those forms.

@dbemke
Copy link

dbemke commented Aug 27, 2024

Unfortunately there's no documentation I can refer to to find the test you asked about (the numbers don't correspond to our existing tests), so I can't find the issue it came from to verify what does the test check or are some steps necessary. Tests with Nigeria wards form is covered in our regression test cycle but tests with repeats are similar but not the same.

Copy link
Member

@seadowg seadowg left a comment

Choose a reason for hiding this comment

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

Let's get rid of BigFormTest and groups_shouldBeVisibleInHierarchyView based on @dbemke's comments.

@grzesiek2010 grzesiek2010 force-pushed the regressionPart3 branch 2 times, most recently from 229e29c to 8697cf3 Compare August 27, 2024 20:03
@seadowg seadowg merged commit 98e673d into getodk:master Aug 29, 2024
6 checks passed
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