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.
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.