E2E tests: don't wait for non-existant file tree
What does this MR do and why?
Currently when checking that an MR contains a particular file, the test checks for the non-existence of the file_tree_container (has_element?(:file_tree_container)
) which usually takes 10s because the file tree is not shown by default. In this MR we reverse the check to be has_no_element?(:file_tree_container)
so in the normal case we save 10 seconds.
Before - waits for 10s:
- https://ops.gitlab.net/gitlab-org/quality/staging/-/jobs/10768742#L388
- https://gitlab.com/gitlab-org/gitlab/-/jobs/4795223323#L584
- https://gitlab.com/gitlab-org/gitlab/-/jobs/4795223315#L1104
- https://gitlab.com/gitlab-org/gitlab/-/jobs/4795223329#L971
- https://gitlab.com/gitlab-org/gitlab/-/jobs/4795223314#L1164
The only test where the file tree container is already open is in the large-setup job e.g. https://gitlab.com/gitlab-org/gitlab/-/jobs/4795223360#L282 This may be because the project the MR is against is imported, or that the MR is large.
After <1s -
- https://gitlab.com/gitlab-org/gitlab/-/jobs/4795547661#L182
- https://gitlab.com/gitlab-org/gitlab/-/jobs/4795547650#L772
- https://gitlab.com/gitlab-org/gitlab/-/jobs/4795547653#L1896
- https://gitlab.com/gitlab-org/gitlab/-/jobs/4795547657#L2374
In the large-setup job it takes 10s: https://gitlab.com/gitlab-org/gitlab/-/jobs/4795547696#L195
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.