Add posts in popup via AJAX. Add tests