Swap use of jQuery load event before setting new src, detect CI env variable to avoid tests for alert failing