allyourbot / hostedgpt

An open version of ChatGPT you can host anywhere or run locally.
MIT License
192 stars 75 forks source link

Deep fix for two flaky test assertions: toast & image-load scrolling #297

Closed krschacht closed 3 weeks ago

krschacht commented 3 weeks ago

When tests are running slowly the toast may have disappeared before assert_text runs. This PR replaces it with a smart assert_toast assertion.

In addition, we still have flaky scroll-to-bottom after all images are loading. I do not think this is a flaky test, I think this is actually a flaky feature. I believe this is actually related to a race condition with the detection of image loading and the firing of scroll down. I added extra checks for after images load to decide when to fire the scroll down event. I also added extra checks for the test environment.