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: fix flaky form feedback test #2217

Merged
merged 2 commits into from
Jun 21, 2021
Merged

test: fix flaky form feedback test #2217

merged 2 commits into from
Jun 21, 2021

Conversation

mantariksh
Copy link
Contributor

Problem

Closes #2213

Solution

Instead of mucking around with array sorting again, just perform an unordered check by using arrayContaining to check that the expected array is a subset of the received array, and then check that their lengths are identical to ensure that the arrays contain identical contents. Since this loses the check on the ordering of the elements, perform an additional check that the timestamps are sorted. This works even if the array elements are different, as long as the timestamps are identical.

@mantariksh mantariksh requested a review from karrui June 21, 2021 01:41
@mantariksh mantariksh merged commit 66ac98e into develop Jun 21, 2021
@mantariksh mantariksh deleted the test/flaky-feedback branch June 21, 2021 02:39
@tshuli tshuli mentioned this pull request Jun 22, 2021
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.

getFormFeedbacks test still flaky
2 participants