mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:25:35 +08:00
parent
3408db94f0
commit
8968887e24
|
@ -16,9 +16,9 @@ export default class TrapTabModifier extends Modifier {
|
|||
modify(element, _, { preventScroll, autofocus }) {
|
||||
autofocus ??= true;
|
||||
this.preventScroll = preventScroll ?? true;
|
||||
this.orignalElement = element;
|
||||
this.originalElement = element;
|
||||
this.element = element.querySelector(".modal-inner-container") || element;
|
||||
this.orignalElement.addEventListener("keydown", this.trapTab);
|
||||
this.originalElement.addEventListener("keydown", this.trapTab);
|
||||
|
||||
// on first trap we don't allow to focus modal-close
|
||||
// and apply manual focus only if we don't have any autofocus element
|
||||
|
@ -72,6 +72,6 @@ export default class TrapTabModifier extends Modifier {
|
|||
}
|
||||
|
||||
cleanup() {
|
||||
this.orignalElement.removeEventListener("keydown", this.trapTab);
|
||||
this.originalElement.removeEventListener("keydown", this.trapTab);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ acceptance("User Preference - No Secondary Emails Allowed", function (needs) {
|
|||
needs.pretender(preferencesPretender);
|
||||
needs.settings({ max_allowed_secondary_emails: 0 });
|
||||
|
||||
test("Add Alternate Email Button is unvailable", async function (assert) {
|
||||
test("Add Alternate Email Button is unavailable", async function (assert) {
|
||||
await visit("/u/eviltrout/preferences");
|
||||
|
||||
assert.dom(".pref-email a").doesNotExist();
|
||||
|
|
|
@ -118,7 +118,7 @@ class PrivateMessageTopicTrackingState
|
|||
)
|
||||
end
|
||||
|
||||
# Note: At some point we may want to make the same peformance optimisation
|
||||
# Note: At some point we may want to make the same performance optimisation
|
||||
# here as we did with the other topic tracking state, where we only send
|
||||
# one 'unread' update to all users, not a more accurate unread update to
|
||||
# each individual user with their own read state.
|
||||
|
|
|
@ -57,7 +57,7 @@ class BaseBookmarkable
|
|||
#
|
||||
# @param [User] user The user to perform the query for, this scopes the bookmarks returned.
|
||||
# @param [Guardian] guardian An instance of Guardian for the user to be used for security filters.
|
||||
# @return [Bookmark::ActiveRecord_AssociationRelation] Should be an approprialely scoped list of bookmarks for the user.
|
||||
# @return [Bookmark::ActiveRecord_AssociationRelation] Should be an appropriately scoped list of bookmarks for the user.
|
||||
def self.list_query(user, guardian)
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
@ -200,7 +200,7 @@ class BaseBookmarkable
|
|||
# may be deleted 3 days after the post or topic is deleted.
|
||||
#
|
||||
# In the case of bookmarkable records that are not trashable, and where
|
||||
# dependent_destroy is not used, this shouldjust delete the bookmarks pointing
|
||||
# dependent_destroy is not used, this should just delete the bookmarks pointing
|
||||
# to the record which no longer exists in the database.
|
||||
def self.cleanup_deleted
|
||||
# noop
|
||||
|
|
|
@ -25,7 +25,7 @@ class CategoryHashtagDataSource
|
|||
item.relative_url = category.url
|
||||
item.id = category.id
|
||||
|
||||
# Single-level category heirarchy should be enough to distinguish between
|
||||
# Single-level category hierarchy should be enough to distinguish between
|
||||
# categories here.
|
||||
item.ref = category.slug_ref
|
||||
end
|
||||
|
|
|
@ -17,13 +17,13 @@ module(
|
|||
});
|
||||
|
||||
test("@includeOriginalMessageUser=true", async function (assert) {
|
||||
const orignalMessageUser = fabricators.user({ username: "bob" });
|
||||
const originalMessageUser = fabricators.user({ username: "bob" });
|
||||
this.thread = fabricators.thread({
|
||||
original_message: fabricators.message({ user: orignalMessageUser }),
|
||||
original_message: fabricators.message({ user: originalMessageUser }),
|
||||
preview: fabricators.threadPreview({
|
||||
channel: this.channel,
|
||||
participant_users: [
|
||||
orignalMessageUser,
|
||||
originalMessageUser,
|
||||
fabricators.user({ username: "alice" }),
|
||||
],
|
||||
}),
|
||||
|
@ -35,13 +35,13 @@ module(
|
|||
});
|
||||
|
||||
test("@includeOriginalMessageUser=false", async function (assert) {
|
||||
const orignalMessageUser = fabricators.user({ username: "bob" });
|
||||
const originalMessageUser = fabricators.user({ username: "bob" });
|
||||
this.thread = fabricators.thread({
|
||||
original_message: fabricators.message({ user: orignalMessageUser }),
|
||||
original_message: fabricators.message({ user: originalMessageUser }),
|
||||
preview: fabricators.threadPreview({
|
||||
channel: this.channel,
|
||||
participant_users: [
|
||||
orignalMessageUser,
|
||||
originalMessageUser,
|
||||
fabricators.user({ username: "alice" }),
|
||||
],
|
||||
}),
|
||||
|
|
|
@ -4,7 +4,7 @@ import { setupTest } from "ember-qunit";
|
|||
import { module, test } from "qunit";
|
||||
import pretender from "discourse/tests/helpers/create-pretender";
|
||||
|
||||
function emojisReponse() {
|
||||
function emojisResponse() {
|
||||
return { favorites: [{ name: "sad" }] };
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ module(
|
|||
|
||||
hooks.beforeEach(function () {
|
||||
pretender.get("/chat/emojis.json", () => {
|
||||
return [200, {}, emojisReponse()];
|
||||
return [200, {}, emojisResponse()];
|
||||
});
|
||||
|
||||
this.manager = getOwner(this).lookup("service:chat-emoji-picker-manager");
|
||||
|
@ -61,7 +61,7 @@ module(
|
|||
|
||||
await settled();
|
||||
|
||||
assert.deepEqual(this.manager.emojis, emojisReponse());
|
||||
assert.deepEqual(this.manager.emojis, emojisResponse());
|
||||
assert.strictEqual(this.manager.loading, false);
|
||||
});
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
describe "Admin Revamp | Sidebar Naviagion", type: :system do
|
||||
describe "Admin Revamp | Sidebar Navigation", type: :system do
|
||||
fab!(:admin)
|
||||
let(:sidebar_page) { PageObjects::Components::NavigationMenu::Sidebar.new }
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# frozen_string_literal: true
|
||||
|
||||
describe "Flagging post", type: :system, js: true do
|
||||
fab!(:current_user) { Fabricate(:admin) }
|
||||
fab!(:first_post) { Fabricate(:post) }
|
||||
|
|
Loading…
Reference in New Issue
Block a user