X-Git-Url: http://these/git/?a=blobdiff_plain;f=api_tests%2Fsrc%2Fcommunity.spec.ts;fp=ui%2Fsrc%2Fapi_tests%2Fcommunity.spec.ts;h=f1cbf8db708bcd7214ed26d1da0f0998d7ba78bb;hb=5c6258390c46159c16f49295314c6519215fc6ae;hp=bd498009a98a43b589ec684252d9e8bfc2a75efe;hpb=b69524b498983da636b3a31f5acb74fbb1f13ab4;p=lemmy.git diff --git a/ui/src/api_tests/community.spec.ts b/api_tests/src/community.spec.ts similarity index 80% rename from ui/src/api_tests/community.spec.ts rename to api_tests/src/community.spec.ts index bd498009..f1cbf8db 100644 --- a/ui/src/api_tests/community.spec.ts +++ b/api_tests/src/community.spec.ts @@ -1,8 +1,10 @@ +jest.setTimeout(120000); import { alpha, beta, setupLogins, searchForBetaCommunity, + searchForCommunity, createCommunity, deleteCommunity, removeCommunity, @@ -21,6 +23,17 @@ 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`; + let search = await searchForCommunity(beta, searchShort); + let communityOnBeta = search.communities[0]; + expect(communityOnBeta.name).toBe(communityRes.community.name); + expect(communityOnBeta.title).toBe(communityRes.community.title); + expect(communityOnBeta.description).toBe(communityRes.community.description); + expect(communityOnBeta.icon).toBe(communityRes.community.icon); + expect(communityOnBeta.banner).toBe(communityRes.community.banner); }); test('Delete community', async () => {