Skip to content

E2E tests: don't wait for non-existant file tree

Jay McCure requested to merge jmc-less-wait-file-tree into master

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:

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 -

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.

Edited by Jay McCure

Merge request reports