Wait for AJAX requests at the JS level in addition to wait for requests at the middleware level
Wait for AJAX requests at the JS level in addition to wait for requests at the middleware level

Hopefully, this can solve transient failures such as
https://gitlab.com/gitlab-org/gitlab-ce/issues/29836.

Signed-off-by: Rémy Coutable <4ea0184b9df19e0786dd00b28e6daa4d26baeb3e@rymai.me>

htve/GitlabForChinese,dreampet/gitlab,iiet/iiet-git,dplarson/gitlabhq,mmkassem/gitlabhq,t-zuehlsdorff/gitlabhq,dplarson/gitlabhq,t-zuehlsdorff/gitlabhq,iiet/iiet-git,stoplightio/gitlabhq,jirutka/gitlabhq,htve/GitlabForChinese,dplarson/gitlabhq,iiet/iiet-git,stoplightio/gitlabhq,mmkassem/gitlabhq,stoplightio/gitlabhq,jirutka/gitlabhq,jirutka/gitlabhq,t-zuehlsdorff/gitlabhq,axilleas/gitlabhq,axilleas/gitlabhq,axilleas/gitlabhq,jirutka/gitlabhq,mmkassem/gitlabhq,t-zuehlsdorff/gitlabhq,htve/GitlabForChinese,dplarson/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,axilleas/gitlabhq,stoplightio/gitlabhq,htve/GitlabForChinese,dreampet/gitlab,iiet/iiet-git,dreampet/gitlab