mirror of
https://github.com/discourse/discourse.git
synced 2025-03-03 21:24:00 +08:00

If a selenium finder takes the full wait duration to resolve, that means it has been written inefficiently. Most likely a matcher has been negated incorrectly. This commit introduces a patch which will raise an error in this situation so that we can catch the issues while developing specs. This commit also fixes chat's visit_thread helper. It was spinning on `has_css?(".chat-skeleton")` for the full selenium wait duration, and then returns false. That's because the thread is often already fully loaded before `has_css?` is even called. It's now updated to only look for the final expected state.