[backend] wait for AJAX request to complete inside order_details_spec test