One of the most common issues we have with browser tests is things failing due to JS not having loaded.
Given I am on the X page
And I click the open JS overlay button
Then I see an overlay
To remedy this in MobileFrontend and QuickSurveys we run the following snipper of JS to see if the module is ready
'mw.loader.getState("ext.quicksurveys.init") === "ready";'
We'd like to formalise this in the Selenium library.