mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
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:
parent
9f78ff5572
commit
7fdede9f0f
@ -27,7 +27,7 @@ module PageObjects
|
|||||||
end
|
end
|
||||||
|
|
||||||
def is_collapsed?
|
def is_collapsed?
|
||||||
has_css?(context + ":not(.is-expanded)")
|
has_css?(context + ":not(.is-expanded)", wait: 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_selected_value?(value)
|
def has_selected_value?(value)
|
||||||
|
Loading…
Reference in New Issue
Block a user