DEV: Speed up slow system tests (#21803)

What is the problem?

Prior to this change, we had a `has_css?(context + ":not(.is-expanded)"`
check when using the select-kit component page object. The problem here
is that this check will end up waiting the full capybara default wait
time if the select-kit has already been expanded. It turns out that we
were calling this check alot of times when the select-kit has already
been expanded resulting in many tests waiting the full default wait
time.

What is the fix?

The fix here is to specify the `wait: 0` option such that we do not wait
and fundamentally, there is no need for us to wait at all here.
This commit is contained in:
Alan Guo Xiang Tan 2023-05-29 14:31:02 +09:00 committed by GitHub
parent 9f78ff5572
commit 7fdede9f0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ module PageObjects
end
def is_collapsed?
has_css?(context + ":not(.is-expanded)")
has_css?(context + ":not(.is-expanded)", wait: 0)
end
def has_selected_value?(value)