Fix tests to work without js
This commit is contained in:
parent
87e28b1c19
commit
190fc3912f
6 changed files with 10 additions and 93 deletions
|
@ -188,7 +188,7 @@
|
|||
name: "Pleroma",
|
||||
email: "example@example.com",
|
||||
notify_email: "noreply@example.com",
|
||||
description: "Pleroma: An efficient and flexible fediverse server",
|
||||
description: "Akkoma: The cooler fediverse server",
|
||||
background_image: "/images/city.jpg",
|
||||
instance_thumbnail: "/instance/thumbnail.jpeg",
|
||||
limit: 5_000,
|
||||
|
|
|
@ -1651,38 +1651,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
group: :pleroma,
|
||||
key: :gopher,
|
||||
type: :group,
|
||||
description: "Gopher settings",
|
||||
children: [
|
||||
%{
|
||||
key: :enabled,
|
||||
type: :boolean,
|
||||
description: "Enables the gopher interface"
|
||||
},
|
||||
%{
|
||||
key: :ip,
|
||||
label: "IP",
|
||||
type: :tuple,
|
||||
description: "IP address to bind to",
|
||||
suggestions: [{0, 0, 0, 0}]
|
||||
},
|
||||
%{
|
||||
key: :port,
|
||||
type: :integer,
|
||||
description: "Port to bind to",
|
||||
suggestions: [9999]
|
||||
},
|
||||
%{
|
||||
key: :dstport,
|
||||
type: :integer,
|
||||
description: "Port advertised in URLs (optional, defaults to port)",
|
||||
suggestions: [9999]
|
||||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
group: :pleroma,
|
||||
key: :activitypub,
|
||||
|
@ -2567,45 +2535,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
group: :esshd,
|
||||
label: "ESSHD",
|
||||
type: :group,
|
||||
description:
|
||||
"Before enabling this you must add :esshd to mix.exs as one of the extra_applications " <>
|
||||
"and generate host keys in your priv dir with ssh-keygen -m PEM -N \"\" -b 2048 -t rsa -f ssh_host_rsa_key",
|
||||
children: [
|
||||
%{
|
||||
key: :enabled,
|
||||
type: :boolean,
|
||||
description: "Enables SSH"
|
||||
},
|
||||
%{
|
||||
key: :priv_dir,
|
||||
type: :string,
|
||||
description: "Dir with SSH keys",
|
||||
suggestions: ["/some/path/ssh_keys"]
|
||||
},
|
||||
%{
|
||||
key: :handler,
|
||||
type: :string,
|
||||
description: "Handler module",
|
||||
suggestions: ["Pleroma.BBS.Handler"]
|
||||
},
|
||||
%{
|
||||
key: :port,
|
||||
type: :integer,
|
||||
description: "Port to connect",
|
||||
suggestions: [10_022]
|
||||
},
|
||||
%{
|
||||
key: :password_authenticator,
|
||||
type: :string,
|
||||
description: "Authenticator module",
|
||||
suggestions: ["Pleroma.BBS.Authenticator"]
|
||||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
group: :mime,
|
||||
label: "Mime Types",
|
||||
|
|
|
@ -3,4 +3,6 @@
|
|||
<h3>Welcome to Akkoma!</h3>
|
||||
<p>If you're seeing this page, your server works!</p>
|
||||
<p>In order to get a frontend to show here, you'll need to set up <pre>:pleroma, :frontends, :primary</pre> and install your frontend of choice</p>
|
||||
<!--server-generated-meta-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -238,7 +238,9 @@ test "EmojiReact notification with remote custom emoji" do
|
|||
other_user = insert(:user, local: false)
|
||||
|
||||
{:ok, activity} = CommonAPI.post(user, %{status: "#morb"})
|
||||
{:ok, emoji_react, _} = Builder.emoji_react(other_user, Object.normalize(activity, fetch: false), ":100a:")
|
||||
|
||||
{:ok, emoji_react, _} =
|
||||
Builder.emoji_react(other_user, Object.normalize(activity, fetch: false), ":100a:")
|
||||
|
||||
remoteUrl = "http://evil.website/emoji/100a.png"
|
||||
[tag] = emoji_react["tag"]
|
||||
|
@ -259,11 +261,12 @@ test "EmojiReact notification with remote custom emoji" do
|
|||
pleroma: %{is_seen: false, is_muted: false},
|
||||
type: "pleroma:emoji_reaction",
|
||||
emoji: ":100a:",
|
||||
emoji_url: (if testProxy, do: MediaProxy.encode_url(remoteUrl), else: remoteUrl),
|
||||
emoji_url: if(testProxy, do: MediaProxy.encode_url(remoteUrl), else: remoteUrl),
|
||||
account: AccountView.render("show.json", %{user: other_user, for: user}),
|
||||
status: StatusView.render("show.json", %{activity: activity, for: user}),
|
||||
created_at: Utils.to_masto_date(notification.inserted_at)
|
||||
}
|
||||
|
||||
test_notifications_rendering([notification], user, [expected])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -45,21 +45,4 @@ test "also overrides frontend files", %{conn: conn} do
|
|||
index = get(conn, "/")
|
||||
assert html_response(index, 200) == "from instance static"
|
||||
end
|
||||
|
||||
test "overrides any file in static/static" do
|
||||
bundled_index = get(build_conn(), "/static/terms-of-service.html")
|
||||
|
||||
assert html_response(bundled_index, 200) ==
|
||||
File.read!("priv/static/static/terms-of-service.html")
|
||||
|
||||
File.mkdir!(@dir <> "/static")
|
||||
File.write!(@dir <> "/static/terms-of-service.html", "plz be kind")
|
||||
|
||||
index = get(build_conn(), "/static/terms-of-service.html")
|
||||
assert html_response(index, 200) == "plz be kind"
|
||||
|
||||
File.write!(@dir <> "/static/kaniini.html", "<h1>rabbit hugs as a service</h1>")
|
||||
index = get(build_conn(), "/static/kaniini.html")
|
||||
assert html_response(index, 200) == "<h1>rabbit hugs as a service</h1>"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -15,13 +15,13 @@ test "it renders the info", %{"/api/v1/instance" => info} do
|
|||
registrations: true
|
||||
} = info
|
||||
|
||||
assert String.equivalent?(description, "Pleroma: An efficient and flexible fediverse server")
|
||||
assert String.equivalent?(description, "Akkoma: The cooler fediverse server")
|
||||
end
|
||||
|
||||
test "it renders the panel", %{"/instance/panel.html" => panel} do
|
||||
assert String.contains?(
|
||||
panel,
|
||||
"<p>Welcome to <a href=\"https://pleroma.social\" target=\"_blank\">Pleroma!</a></p>"
|
||||
"<p>Welcome to <a href=\"https://akkoma.dev\" target=\"_blank\">Akkoma</a>!</p>"
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue