Fix flakey time-senstive group filter specs
What does this MR do?
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6150
Fix flakey time-senstive group filter specs
Found while working on https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6051, failing test: https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/74649298
Are there points in the code the reviewer needs to double check?
These tests passed previously because the filtered group search is debounced by 0.5s. The test cleared the input, entered group1
, cleared the input, entered nothing, and the all of groups are still listed because of the 0.5s debounce hasn't triggered and the test passes before anything is actually filtered.
Even if we assert that the list is filtered before clearing the input, the test still fails because the nature of the fill_in 'filter', with: ""
method is that "if you're setting the value to "", no keys are ever actually sent, hence no [input
] event" and we never filter back to everything in the list.
So the solution is two-fold, add in the assertions that the list is actually filtered after each step. Then use a method that fills the input with proper events fired.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary- Not a user-facing change
-
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a Backend maintainer
-
-
Conform by the merge request performance guides -
Conform by the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)