add ErrorAlert view test, tiny refactor
integration test for ajaxError on ErrorAlert, refactor

Here we make ErrorAlert responsible for registering an ajaxError handler