test('Sticky a post', async () => {
let search = await searchForBetaCommunity(alpha);
let postRes = await createPost(alpha, search.communities[0].id);
+ await delay();
let stickiedPostRes = await stickyPost(alpha, true, postRes.post);
expect(stickiedPostRes.post.stickied).toBe(true);
+ await delay();
// Make sure that post is stickied on beta
let searchBeta = await searchPost(beta, postRes.post);
expect(betaPost.community_local).toBe(true);
expect(betaPost.creator_local).toBe(false);
expect(betaPost.stickied).toBe(true);
+ await delay();
// Unsticky a post
let unstickiedPost = await stickyPost(alpha, false, postRes.post);
expect(betaPost2.community_local).toBe(true);
expect(betaPost2.creator_local).toBe(false);
expect(betaPost2.stickied).toBe(false);
+ await delay();
// Make sure that gamma cannot sticky the post on beta
let searchGamma = await searchPost(gamma, postRes.post);
test('Lock a post', async () => {
let search = await searchForBetaCommunity(alpha);
+ await delay();
let postRes = await createPost(alpha, search.communities[0].id);
await delay();
test('Remove a post from admin and community on same instance', async () => {
let search = await searchForBetaCommunity(alpha);
+ await delay();
let postRes = await createPost(alpha, search.communities[0].id);
await delay();