Reports, and who liked or boosted a post
Another's profile and posts can be reported from the client (/api/v1/reports): a category, words, and for a remote account a copy to its server, which PrivaPub sends from its own actor, never naming the persona. Who liked or boosted a post opens from its card's menu (favourited_by, reblogged_by). e2e: a report from a Mastodon account's profile reaches PrivaPub's moderators forwarded, and a post's likes and boosts list the persona who gave them; the admin helper the tests share moves to Support. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
1 parent
bb68ff8d5e
commit
a0f07abf8c
17 files changed
+410
-16
No files matched your search
@@ -1,4 +1,3 @@
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
|
||||
using decePubClient.E2E.Support;
|
||||
@@ -11,22 +10,10 @@ namespace decePubClient.E2E.Actions
|
||||
// and unblocked, the federation statistics, and the reports moderators handle; each change checked on /clientapi
|
||||
public sealed class AdministrationTests(Browser browser)
|
||||
{
|
||||
const string Root = "pastureroot";
|
||||
const string Password = "Pasture-Pass-1!";
|
||||
static readonly Pasture.Persona Admin = new("alice", "alice", Root, Password, null, null, null);
|
||||
const string Root = PastureAdmin.Root;
|
||||
static readonly Pasture.Persona Admin = new("alice", "alice", Root, PastureAdmin.Password, null, null, null);
|
||||
|
||||
static async Task<JsonNode> AsAdmin(string path)
|
||||
{
|
||||
using var http = Pasture.Http();
|
||||
var login = await http.PostAsJsonAsync($"{Pasture.Api}/clientapi/user/login", new { userName = Root, password = Password });
|
||||
login.EnsureSuccessStatusCode();
|
||||
var jwt = (await login.Content.ReadFromJsonAsync<JsonObject>())!["token"]!.GetValue<string>();
|
||||
using var request = new HttpRequestMessage(HttpMethod.Get, Pasture.Api + path);
|
||||
request.Headers.Authorization = new("Bearer", jwt);
|
||||
using var response = await http.SendAsync(request);
|
||||
response.EnsureSuccessStatusCode();
|
||||
return JsonNode.Parse(await response.Content.ReadAsStringAsync());
|
||||
}
|
||||
static Task<JsonNode> AsAdmin(string path) => PastureAdmin.Get(path);
|
||||
|
||||
static async Task<ILocator> Open(IPage page, string section)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user