[build] Bulletproofing tests to try to fix more flickers.
- added a waitUntilPageJSIsLoaded() method to help with sinchronization of the UI and used it in the BasePage constructor.
- Note: when reusing instances of BasePage, the constructor is not doing the work anymore and the waitUntilPageJSIsLoaded() method needs to be executed manually, when needed.