From c2c41f1c34539146b6fcdb1febfeec82c3dcc0ef Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 7 Apr 2021 16:30:04 -0400 Subject: [PATCH] Fixing federation tests. --- api_tests/package.json | 2 +- api_tests/src/community.spec.ts | 1 - api_tests/src/private_message.spec.ts | 4 ++-- api_tests/src/user.spec.ts | 4 ++-- api_tests/yarn.lock | 8 ++++---- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/api_tests/package.json b/api_tests/package.json index 1b0583c4f..ca21c4130 100644 --- a/api_tests/package.json +++ b/api_tests/package.json @@ -16,7 +16,7 @@ "eslint": "^7.18.0", "eslint-plugin-jane": "^9.0.3", "jest": "^26.6.3", - "lemmy-js-client": "0.11.0-rc.1", + "lemmy-js-client": "0.11.0-rc.3", "node-fetch": "^2.6.1", "prettier": "^2.1.2", "ts-jest": "^26.4.4", diff --git a/api_tests/src/community.spec.ts b/api_tests/src/community.spec.ts index 7be6f4c59..a86c1259a 100644 --- a/api_tests/src/community.spec.ts +++ b/api_tests/src/community.spec.ts @@ -31,7 +31,6 @@ function assertCommunityFederation( expect(communityOne.community.published).toBe( communityTwo.community.published ); - expect(communityOne.creator.actor_id).toBe(communityTwo.creator.actor_id); expect(communityOne.community.nsfw).toBe(communityTwo.community.nsfw); expect(communityOne.community.removed).toBe(communityTwo.community.removed); expect(communityOne.community.deleted).toBe(communityTwo.community.deleted); diff --git a/api_tests/src/private_message.spec.ts b/api_tests/src/private_message.spec.ts index 5539b19c7..11b41cb17 100644 --- a/api_tests/src/private_message.spec.ts +++ b/api_tests/src/private_message.spec.ts @@ -15,8 +15,8 @@ let recipient_id: number; beforeAll(async () => { await setupLogins(); - let follow = await followBeta(alpha); - recipient_id = follow.community_view.creator.id; + await followBeta(alpha); + recipient_id = 3; }); afterAll(async () => { diff --git a/api_tests/src/user.spec.ts b/api_tests/src/user.spec.ts index 5d10fd043..a10876cf5 100644 --- a/api_tests/src/user.spec.ts +++ b/api_tests/src/user.spec.ts @@ -19,7 +19,7 @@ let apShortname: string; function assertUserFederation(userOne: PersonViewSafe, userTwo: PersonViewSafe) { expect(userOne.person.name).toBe(userTwo.person.name); - expect(userOne.person.display_name).toBe(userTwo.person.display_name); + expect(userOne.person.preferred_username).toBe(userTwo.person.preferred_username); expect(userOne.person.bio).toBe(userTwo.person.bio); expect(userOne.person.actor_id).toBe(userTwo.person.actor_id); expect(userOne.person.avatar).toBe(userTwo.person.avatar); @@ -49,7 +49,7 @@ test('Set some user settings, check that they are federated', async () => { lang: '', avatar, banner, - display_name: 'user321', + preferred_username: 'user321', show_avatars: false, send_notifications_to_email: false, bio, diff --git a/api_tests/yarn.lock b/api_tests/yarn.lock index f3b8e603f..1e459523b 100644 --- a/api_tests/yarn.lock +++ b/api_tests/yarn.lock @@ -3233,10 +3233,10 @@ language-tags@^1.0.5: dependencies: language-subtag-registry "~0.3.2" -lemmy-js-client@0.11.0-rc.1: - version "0.11.0-rc.1" - resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.11.0-rc.1.tgz#0031676be9fc787157a21dd3f5095dd1ee9e6a57" - integrity sha512-dtpxe/hHTbYEv2WnfGkAieOB9jyKUVED+y4DosUp/FcaatjPcMTiKOvCdMNjlvvG/9GyclWEoyNitPEsvJwjmg== +lemmy-js-client@0.11.0-rc.3: + version "0.11.0-rc.3" + resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.11.0-rc.3.tgz#dd4727ca4d16fe9593368725aacfd9e7a8d52548" + integrity sha512-16mgl+TS1+0UHiY+ZKPuqHfbrn93h8K8tJ+kKJ1pjT2WhG23o0B8dLahG1jDQPG+dkXpR6PZxYudMYjuO8WvjQ== leven@^3.1.0: version "3.1.0"