parent
8e4affec54
commit
5c54fbfdb1
|
@ -55,7 +55,7 @@ export default class AdminPlugin {
|
||||||
get nameTitleized() {
|
get nameTitleized() {
|
||||||
// The category name is better in a lot of cases, as it's a human-inputted
|
// The category name is better in a lot of cases, as it's a human-inputted
|
||||||
// translation, and we can handle things like SAML instead of showing them
|
// translation, and we can handle things like SAML instead of showing them
|
||||||
// as Saml from discourse-saml. We can fall back to the programattic version
|
// as Saml from discourse-saml. We can fall back to the programmatic version
|
||||||
// though if needed.
|
// though if needed.
|
||||||
let name;
|
let name;
|
||||||
if (this.translatedCategoryName) {
|
if (this.translatedCategoryName) {
|
||||||
|
|
|
@ -627,10 +627,10 @@ class PluginApi {
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* action: may be a string or a function. If it is a string, a wiget action
|
* action: may be a string or a function. If it is a string, a widget action
|
||||||
* will be triggered. If it is function, the function will be called.
|
* will be triggered. If it is function, the function will be called.
|
||||||
*
|
*
|
||||||
* function will recieve a single argument:
|
* function will receive a single argument:
|
||||||
* {
|
* {
|
||||||
* post:
|
* post:
|
||||||
* showFeedback:
|
* showFeedback:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { importSync } from "@embroider/macros";
|
import { importSync } from "@embroider/macros";
|
||||||
import loaderShim from "discourse-common/lib/loader-shim";
|
import loaderShim from "discourse-common/lib/loader-shim";
|
||||||
|
|
||||||
// AMD shims for the app bunndle, see the comment in loader-shim.js
|
// AMD shims for the app bundle, see the comment in loader-shim.js
|
||||||
// These effectively become public APIs for plugins, so add/remove them carefully
|
// These effectively become public APIs for plugins, so add/remove them carefully
|
||||||
loaderShim("@discourse/itsatrap", () => importSync("@discourse/itsatrap"));
|
loaderShim("@discourse/itsatrap", () => importSync("@discourse/itsatrap"));
|
||||||
loaderShim("@ember-compat/tracked-built-ins", () =>
|
loaderShim("@ember-compat/tracked-built-ins", () =>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { importSync } from "@embroider/macros";
|
import { importSync } from "@embroider/macros";
|
||||||
import loaderShim from "discourse-common/lib/loader-shim";
|
import loaderShim from "discourse-common/lib/loader-shim";
|
||||||
|
|
||||||
// AMD shims for the test bunndle, see the comment in loader-shim.js
|
// AMD shims for the test bundle, see the comment in loader-shim.js
|
||||||
loaderShim("pretender", () => importSync("pretender"));
|
loaderShim("pretender", () => importSync("pretender"));
|
||||||
loaderShim("qunit", () => importSync("qunit"));
|
loaderShim("qunit", () => importSync("qunit"));
|
||||||
loaderShim("sinon", () => importSync("sinon"));
|
loaderShim("sinon", () => importSync("sinon"));
|
||||||
|
|
|
@ -129,7 +129,7 @@ RSpec.describe "Chat composer draft", type: :system do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "loads the draft with replied to mesage" do
|
it "loads the draft with replied to message" do
|
||||||
chat_page.visit_channel(channel_1)
|
chat_page.visit_channel(channel_1)
|
||||||
|
|
||||||
expect(channel_page.composer.value).to eq("draft")
|
expect(channel_page.composer.value).to eq("draft")
|
||||||
|
|
|
@ -78,7 +78,7 @@ Fabricator(:post_with_uploaded_image, from: :post) do
|
||||||
end
|
end
|
||||||
|
|
||||||
Fabricator(:post_with_an_attachment, from: :post) do
|
Fabricator(:post_with_an_attachment, from: :post) do
|
||||||
raw "<a class=\"attachment\" href=\"/#{Discourse.store.upload_path}/origina/1X/66b3ed1503efc936.zip\">archive.zip</a>"
|
raw "<a class=\"attachment\" href=\"/#{Discourse.store.upload_path}/original/1X/66b3ed1503efc936.zip\">archive.zip</a>"
|
||||||
end
|
end
|
||||||
|
|
||||||
Fabricator(:post_with_unsized_images, from: :post) do
|
Fabricator(:post_with_unsized_images, from: :post) do
|
||||||
|
|
|
@ -40,7 +40,7 @@ TEXT
|
||||||
end
|
end
|
||||||
|
|
||||||
it "the plugin name the plugin site settings are still under the generic plugins: category" do
|
it "the plugin name the plugin site settings are still under the generic plugins: category" do
|
||||||
plugin_instance.stubs(:setting_catgory).returns("plugins")
|
plugin_instance.stubs(:setting_category).returns("plugins")
|
||||||
expect(plugin_instance.humanized_name).to eq("sample-plugin")
|
expect(plugin_instance.humanized_name).to eq("sample-plugin")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -716,7 +716,7 @@ RSpec.describe Post do
|
||||||
SiteSetting.max_mentions_per_post = 1
|
SiteSetting.max_mentions_per_post = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
it "allows vmax_mentions_per_post mentions" do
|
it "allows max_mentions_per_post mentions" do
|
||||||
post_with_one_mention.user.trust_level = TrustLevel[1]
|
post_with_one_mention.user.trust_level = TrustLevel[1]
|
||||||
expect(post_with_one_mention).to be_valid
|
expect(post_with_one_mention).to be_valid
|
||||||
end
|
end
|
||||||
|
|
|
@ -66,7 +66,7 @@ RSpec.describe CategoriesController do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not returns subcatgories without permission" do
|
it "does not returns subcategories without permission" do
|
||||||
subcategory = Fabricate(:category, user: admin, parent_category: category)
|
subcategory = Fabricate(:category, user: admin, parent_category: category)
|
||||||
subcategory.set_permissions(admins: :full)
|
subcategory.set_permissions(admins: :full)
|
||||||
subcategory.save!
|
subcategory.save!
|
||||||
|
|
|
@ -61,7 +61,7 @@ describe "Topic page", type: :system do
|
||||||
sign_in Fabricate(:admin)
|
sign_in Fabricate(:admin)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "displays the gap to admins, and alows them to expand it" do
|
it "displays the gap to admins, and allows them to expand it" do
|
||||||
visit "/t/#{topic.slug}/#{topic.id}"
|
visit "/t/#{topic.slug}/#{topic.id}"
|
||||||
|
|
||||||
expect(page).to have_css(".topic-post", count: 2)
|
expect(page).to have_css(".topic-post", count: 2)
|
||||||
|
|
Loading…
Reference in New Issue