mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-30 00:01:25 +00:00
update
This commit is contained in:
parent
0583505320
commit
6eaa569d13
5 changed files with 9 additions and 16 deletions
|
@ -28,7 +28,7 @@
|
|||
"eslint": "^9.14.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"jest": "^29.5.0",
|
||||
"lemmy-js-client": "0.20.0-api-v4.5",
|
||||
"lemmy-js-client": "0.20.0-api-v4.6",
|
||||
"prettier": "^3.2.5",
|
||||
"ts-jest": "^29.1.0",
|
||||
"typescript": "^5.5.4",
|
||||
|
|
|
@ -703,9 +703,9 @@ test("Check that activity from another instance is sent to third instance", asyn
|
|||
test("Fetch in_reply_tos: A is unsubbed from B, B makes a post, and some embedded comments, A subs to B, B updates the lowest level comment, A fetches both the post and all the inreplyto comments for that post.", async () => {
|
||||
// Unfollow all remote communities
|
||||
let my_user = await unfollowRemotes(alpha);
|
||||
expect(
|
||||
my_user.follows.filter(c => c.community.local == false).length,
|
||||
).toBe(0);
|
||||
expect(my_user.follows.filter(c => c.community.local == false).length).toBe(
|
||||
0,
|
||||
);
|
||||
|
||||
// B creates a post, and two comments, should be invisible to A
|
||||
let postOnBetaRes = await createPost(beta, 2);
|
||||
|
|
|
@ -453,8 +453,7 @@ test("Enforce site ban federation for local user", async () => {
|
|||
|
||||
// create a test user
|
||||
let alphaUserHttp = await registerUser(alpha, alphaUrl);
|
||||
let alphaUserPerson = (await getMyUser(alphaUserHttp)).local_user_view
|
||||
.person;
|
||||
let alphaUserPerson = (await getMyUser(alphaUserHttp)).local_user_view.person;
|
||||
let alphaUserActorId = alphaUserPerson?.actor_id;
|
||||
if (!alphaUserActorId) {
|
||||
throw "Missing alpha user actor id";
|
||||
|
@ -534,8 +533,7 @@ test("Enforce site ban federation for federated user", async () => {
|
|||
|
||||
// create a test user
|
||||
let alphaUserHttp = await registerUser(alpha, alphaUrl);
|
||||
let alphaUserPerson = (await getMyUser(alphaUserHttp)).local_user_view
|
||||
.person;
|
||||
let alphaUserPerson = (await getMyUser(alphaUserHttp)).local_user_view.person;
|
||||
let alphaUserActorId = alphaUserPerson?.actor_id;
|
||||
if (!alphaUserActorId) {
|
||||
throw "Missing alpha user actor id";
|
||||
|
@ -565,8 +563,7 @@ test("Enforce site ban federation for federated user", async () => {
|
|||
expect(banAlphaOnBeta.banned).toBe(true);
|
||||
|
||||
// The beta site ban should NOT be federated to alpha
|
||||
let alphaPerson2 = (await getMyUser(alphaUserHttp)).local_user_view
|
||||
.person;
|
||||
let alphaPerson2 = (await getMyUser(alphaUserHttp)).local_user_view.person;
|
||||
expect(alphaPerson2.banned).toBe(false);
|
||||
|
||||
// existing alpha post should be removed on beta
|
||||
|
|
|
@ -771,9 +771,7 @@ export async function listPrivateMessages(
|
|||
return api.getPrivateMessages(form);
|
||||
}
|
||||
|
||||
export async function unfollowRemotes(
|
||||
api: LemmyHttp,
|
||||
): Promise<MyUserInfo> {
|
||||
export async function unfollowRemotes(api: LemmyHttp): Promise<MyUserInfo> {
|
||||
// Unfollow all remote communities
|
||||
let my_user = await getMyUser(api);
|
||||
let remoteFollowed =
|
||||
|
|
|
@ -153,9 +153,7 @@ test("Create user with accept-language", async () => {
|
|||
|
||||
let my_user = await getMyUser(user);
|
||||
expect(my_user).toBeDefined();
|
||||
expect(my_user?.local_user_view.local_user.interface_language).toBe(
|
||||
"fr",
|
||||
);
|
||||
expect(my_user?.local_user_view.local_user.interface_language).toBe("fr");
|
||||
let site = await getSite(user);
|
||||
let langs = site.all_languages
|
||||
.filter(a => my_user.discussion_languages.includes(a.id))
|
||||
|
|
Loading…
Reference in a new issue