atproto/packages/bsky/tests/views/__snapshots__/threadgating.test.ts.snap
rafael dc8a7842e6
Add followerRule threadgate (#3496)
* Add followerRule threadgate

* changeset
2025-02-06 11:52:21 -03:00

190 lines
4.3 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`views with thread gating applies gate after root post is deleted. 1`] = `undefined`;
exports[`views with thread gating applies gate for empty rules. 1`] = `
Object {
"cid": "cids(0)",
"lists": Array [],
"record": Object {
"$type": "app.bsky.feed.threadgate",
"allow": Array [],
"createdAt": "1970-01-01T00:00:00.000Z",
"post": "record(1)",
},
"uri": "record(0)",
}
`;
exports[`views with thread gating applies gate for follower rule. 1`] = `
Object {
"cid": "cids(0)",
"lists": Array [],
"record": Object {
"$type": "app.bsky.feed.threadgate",
"allow": Array [
Object {
"$type": "app.bsky.feed.threadgate#followerRule",
},
],
"createdAt": "1970-01-01T00:00:00.000Z",
"post": "record(1)",
},
"uri": "record(0)",
}
`;
exports[`views with thread gating applies gate for following rule. 1`] = `
Object {
"cid": "cids(0)",
"lists": Array [],
"record": Object {
"$type": "app.bsky.feed.threadgate",
"allow": Array [
Object {
"$type": "app.bsky.feed.threadgate#followingRule",
},
],
"createdAt": "1970-01-01T00:00:00.000Z",
"post": "record(1)",
},
"uri": "record(0)",
}
`;
exports[`views with thread gating applies gate for list rule. 1`] = `
Object {
"cid": "cids(0)",
"lists": Array [
Object {
"cid": "cids(1)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"listItemCount": 1,
"name": "list a",
"purpose": "app.bsky.graph.defs#modlist",
"uri": "record(2)",
"viewer": Object {
"muted": false,
},
},
Object {
"cid": "cids(2)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"listItemCount": 1,
"name": "list b",
"purpose": "app.bsky.graph.defs#modlist",
"uri": "record(3)",
"viewer": Object {
"muted": false,
},
},
],
"record": Object {
"$type": "app.bsky.feed.threadgate",
"allow": Array [
Object {
"$type": "app.bsky.feed.threadgate#listRule",
"list": "record(2)",
},
Object {
"$type": "app.bsky.feed.threadgate#listRule",
"list": "record(3)",
},
],
"createdAt": "1970-01-01T00:00:00.000Z",
"post": "record(1)",
},
"uri": "record(0)",
}
`;
exports[`views with thread gating applies gate for mention rule. 1`] = `
Object {
"cid": "cids(0)",
"lists": Array [],
"record": Object {
"$type": "app.bsky.feed.threadgate",
"allow": Array [
Object {
"$type": "app.bsky.feed.threadgate#mentionRule",
},
],
"createdAt": "1970-01-01T00:00:00.000Z",
"post": "record(1)",
},
"uri": "record(0)",
}
`;
exports[`views with thread gating applies gate for missing rules, takes no action. 1`] = `
Object {
"cid": "cids(0)",
"lists": Array [],
"record": Object {
"$type": "app.bsky.feed.threadgate",
"createdAt": "1970-01-01T00:00:00.000Z",
"post": "record(1)",
},
"uri": "record(0)",
}
`;
exports[`views with thread gating applies gate for multiple rules. 1`] = `
Object {
"cid": "cids(0)",
"lists": Array [],
"record": Object {
"$type": "app.bsky.feed.threadgate",
"allow": Array [
Object {
"$type": "app.bsky.feed.threadgate#mentionRule",
},
Object {
"$type": "app.bsky.feed.threadgate#followerRule",
},
Object {
"$type": "app.bsky.feed.threadgate#followingRule",
},
],
"createdAt": "1970-01-01T00:00:00.000Z",
"post": "record(1)",
},
"uri": "record(0)",
}
`;
exports[`views with thread gating applies gate for unknown list rule. 1`] = `
Object {
"cid": "cids(0)",
"lists": Array [],
"record": Object {
"$type": "app.bsky.feed.threadgate",
"allow": Array [
Object {
"$type": "app.bsky.feed.threadgate#listRule",
"list": "record(1)",
},
],
"createdAt": "1970-01-01T00:00:00.000Z",
"post": "record(1)",
},
"uri": "record(0)",
}
`;
exports[`views with thread gating does not apply gate to original poster. 1`] = `
Object {
"cid": "cids(0)",
"lists": Array [],
"record": Object {
"$type": "app.bsky.feed.threadgate",
"allow": Array [],
"createdAt": "1970-01-01T00:00:00.000Z",
"post": "record(1)",
},
"uri": "record(0)",
}
`;