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

Remove withIndex usage from flakey test #6387

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

seadowg
Copy link
Member

@seadowg seadowg commented Sep 2, 2024

This removes the deprecated withIndex method use from a flakey test. It appeared (from the video) the test was having problems clicking on the second form.

@seadowg seadowg marked this pull request as ready for review September 2, 2024 08:10
@seadowg seadowg requested a review from grzesiek2010 September 2, 2024 08:10
@@ -150,8 +150,7 @@ class SendFinalizedFormTest {

.clickSendFinalizedForm(2)
.sortByDateNewestFirst()
.selectForm(0)
.selectForm(1)
.clickSelectAll()
Copy link
Member

Choose a reason for hiding this comment

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

Here we wanted to make sure that the older form was being sent first and to do that we selected the newer one first. If we use the select all option it is not guaranteed right? Probably it works like that and selects forms starting from the top of the list but it's not obvious. Can we improve it somehow?

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 this is a good compromise for now: reversing the order causes a fail, and it avoids using the problematic matcher. I definitely agree that selecting them individually provides a bit more coverage, but we'd need to write a new implementation of selectForm that I didn't want to spend time on vs other things.

@seadowg seadowg requested a review from grzesiek2010 September 2, 2024 10:09
@grzesiek2010 grzesiek2010 merged commit 365128c into getodk:master Sep 2, 2024
6 checks passed
@seadowg seadowg deleted the with-index branch September 3, 2024 07:13
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.

2 participants