]> Untitled Git - lemmy.git/blobdiff - api_tests/src/community.spec.ts
Fixing drone tests.
[lemmy.git] / api_tests / src / community.spec.ts
index 7c33f82fd943f8022bc9dbe633ab4f5cb31bf241..906900644203215f11dd734f639a4d51f25e1cae 100644 (file)
@@ -3,15 +3,12 @@ import {
   alpha,
   beta,
   setupLogins,
-  searchForBetaCommunity,
   searchForCommunity,
   createCommunity,
   deleteCommunity,
   removeCommunity,
   getCommunity,
   followCommunity,
-  delay,
-  longDelay,
 } from './shared';
 import {
   Community,
@@ -46,7 +43,6 @@ test('Create community', async () => {
   let prevName = communityRes.community.name;
   let communityRes2 = await createCommunity(alpha, prevName);
   expect(communityRes2['error']).toBe('community_already_exists');
-  await delay();
 
   // Cache the community on beta, make sure it has the other fields
   let searchShort = `!${prevName}@lemmy-alpha:8541`;
@@ -57,21 +53,18 @@ test('Create community', async () => {
 
 test('Delete community', async () => {
   let communityRes = await createCommunity(beta);
-  await delay();
 
   // Cache the community on Alpha
   let searchShort = `!${communityRes.community.name}@lemmy-beta:8551`;
   let search = await searchForCommunity(alpha, searchShort);
   let communityOnAlpha = search.communities[0];
   assertCommunityFederation(communityOnAlpha, communityRes.community);
-  await delay();
 
   // Follow the community from alpha
   let follow = await followCommunity(alpha, true, communityOnAlpha.id);
 
   // Make sure the follow response went through
   expect(follow.community.local).toBe(false);
-  await delay();
 
   let deleteCommunityRes = await deleteCommunity(
     beta,
@@ -79,12 +72,10 @@ test('Delete community', async () => {
     communityRes.community.id
   );
   expect(deleteCommunityRes.community.deleted).toBe(true);
-  await delay();
 
   // Make sure it got deleted on A
   let communityOnAlphaDeleted = await getCommunity(alpha, communityOnAlpha.id);
   expect(communityOnAlphaDeleted.community.deleted).toBe(true);
-  await delay();
 
   // Undelete
   let undeleteCommunityRes = await deleteCommunity(
@@ -93,7 +84,6 @@ test('Delete community', async () => {
     communityRes.community.id
   );
   expect(undeleteCommunityRes.community.deleted).toBe(false);
-  await delay();
 
   // Make sure it got undeleted on A
   let communityOnAlphaUnDeleted = await getCommunity(alpha, communityOnAlpha.id);
@@ -102,21 +92,18 @@ test('Delete community', async () => {
 
 test('Remove community', async () => {
   let communityRes = await createCommunity(beta);
-  await delay();
 
   // Cache the community on Alpha
   let searchShort = `!${communityRes.community.name}@lemmy-beta:8551`;
   let search = await searchForCommunity(alpha, searchShort);
   let communityOnAlpha = search.communities[0];
   assertCommunityFederation(communityOnAlpha, communityRes.community);
-  await delay();
 
   // Follow the community from alpha
   let follow = await followCommunity(alpha, true, communityOnAlpha.id);
 
   // Make sure the follow response went through
   expect(follow.community.local).toBe(false);
-  await delay();
 
   let removeCommunityRes = await removeCommunity(
     beta,
@@ -124,12 +111,10 @@ test('Remove community', async () => {
     communityRes.community.id
   );
   expect(removeCommunityRes.community.removed).toBe(true);
-  await delay();
 
   // Make sure it got Removed on A
   let communityOnAlphaRemoved = await getCommunity(alpha, communityOnAlpha.id);
   expect(communityOnAlphaRemoved.community.removed).toBe(true);
-  await delay();
 
   // unremove
   let unremoveCommunityRes = await removeCommunity(
@@ -138,7 +123,6 @@ test('Remove community', async () => {
     communityRes.community.id
   );
   expect(unremoveCommunityRes.community.removed).toBe(false);
-  await delay();
 
   // Make sure it got undeleted on A
   let communityOnAlphaUnRemoved = await getCommunity(alpha, communityOnAlpha.id);
@@ -148,7 +132,6 @@ test('Remove community', async () => {
 test('Search for beta community', async () => {
   let communityRes = await createCommunity(beta);
   expect(communityRes.community.name).toBeDefined();
-  await delay();
 
   let searchShort = `!${communityRes.community.name}@lemmy-beta:8551`;
   let search = await searchForCommunity(alpha, searchShort);