This PR does another deep dive on auto-scrolling and image loading and attempts to fix race conditions at a root cause. The notable strategies that this PR implements:
Every time we load a conversation page we now wait until the page auto-scrolls to the bottom before proceeding with any other tests
When we are waiting for images to auto-load for tests to run, it now takes a few more seconds total for that to happen to ensure that any earlier assertions have all had a chance to finish.
When images are popping into the page async, we now control the exact moment when the image appears and we record the final moment when the page has finally loaded and scrolled down as a result of loading. During the few moments between when the image appears and when it scrolls down, we even disable auto-scroll tracking so we don't mistake this for a user-initiated scroll and mistakenly think the user intended to not be at the bottom.
Correct some math (both in javascript and in ruby) that we use to check if the page was fully scrolled down
This PR does another deep dive on auto-scrolling and image loading and attempts to fix race conditions at a root cause. The notable strategies that this PR implements: