-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
var copyFormChain: RuleChain = chain().around(rule) | ||
|
||
@Test | ||
fun bigForm_ShouldBeFilledSuccessfully() { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
2347303
to
e0497f0
Compare
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. |
There was a problem hiding this 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.
…e to FormHierarchyTest
229e29c
to
8697cf3
Compare
8697cf3
to
0f39c19
Compare
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:
./gradlew connectedAndroidTest
(or./gradlew testLab
) and confirmed all checks still passDateFormatsTest