mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: Fix random typos (#26881)
This commit is contained in:
@ -30,7 +30,7 @@ export default class DAG {
|
|||||||
/**
|
/**
|
||||||
* Adds a key/value pair to the map. Can optionally specify before/after position requirements.
|
* Adds a key/value pair to the map. Can optionally specify before/after position requirements.
|
||||||
*
|
*
|
||||||
* @param {string} key The key of the item to be added. Can be referenced by other member's postition parameters.
|
* @param {string} key The key of the item to be added. Can be referenced by other member's position parameters.
|
||||||
* @param {any} value
|
* @param {any} value
|
||||||
* @param {Object} position
|
* @param {Object} position
|
||||||
* @param {string | string[]} position.before A key or array of keys of items which should appear before this one.
|
* @param {string | string[]} position.before A key or array of keys of items which should appear before this one.
|
||||||
|
@ -585,7 +585,7 @@ export default class TopicTrackingState extends EmberObject {
|
|||||||
filterFn = isNewOrUnread;
|
filterFn = isNewOrUnread;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unkown filter type ${type}`);
|
throw new Error(`Unknown filter type ${type}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Array.from(this.states.values()).filter((topic) => {
|
return Array.from(this.states.values()).filter((topic) => {
|
||||||
|
@ -1580,7 +1580,7 @@ export default class ComposerService extends Service {
|
|||||||
return this.keyValueStore.getItem("composerHeight");
|
return this.keyValueStore.getItem("composerHeight");
|
||||||
}
|
}
|
||||||
|
|
||||||
// The two custom properties below can be overriden by themes/plugins to set different default composer heights.
|
// The two custom properties below can be overridden by themes/plugins to set different default composer heights.
|
||||||
if (this.model.action === "reply") {
|
if (this.model.action === "reply") {
|
||||||
return "var(--reply-composer-height, 300px)";
|
return "var(--reply-composer-height, 300px)";
|
||||||
} else {
|
} else {
|
||||||
|
@ -2148,7 +2148,7 @@ class UsersController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def deprecate_modify_user_params_method
|
def deprecate_modify_user_params_method
|
||||||
# only issue a deprecation warning if the method is overriden somewhere
|
# only issue a deprecation warning if the method is overridden somewhere
|
||||||
if method(:modify_user_params).source_location[0] !=
|
if method(:modify_user_params).source_location[0] !=
|
||||||
"#{Rails.root}/app/controllers/users_controller.rb"
|
"#{Rails.root}/app/controllers/users_controller.rb"
|
||||||
Discourse.deprecate(
|
Discourse.deprecate(
|
||||||
|
@ -47,7 +47,7 @@ RSpec.describe Chat::Api::ChannelMessagesController do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when channnel doesn’t exist" do
|
context "when channel doesn’t exist" do
|
||||||
it "returns a 404" do
|
it "returns a 404" do
|
||||||
get "/chat/api/channels/-999/messages"
|
get "/chat/api/channels/-999/messages"
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ RSpec.describe Chat::TrashMessage do
|
|||||||
expect(membership_3.reload.last_read_message_id).to eq(other_message.id)
|
expect(membership_3.reload.last_read_message_id).to eq(other_message.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "updates the tracking to nil when there are no other messages left in the channnel" do
|
it "updates the tracking to nil when there are no other messages left in the channel" do
|
||||||
membership_1 =
|
membership_1 =
|
||||||
Fabricate(
|
Fabricate(
|
||||||
:user_chat_channel_membership,
|
:user_chat_channel_membership,
|
||||||
|
@ -34,7 +34,7 @@ module("Discourse Lazy Videos | Component | lazy-video", function (hooks) {
|
|||||||
assert.dom(".icon.youtube-icon").exists();
|
assert.dom(".icon.youtube-icon").exists();
|
||||||
});
|
});
|
||||||
|
|
||||||
test("uses tthe dominant color from the dom", async function (assert) {
|
test("uses the dominant color from the dom", async function (assert) {
|
||||||
await render(hbs`<LazyVideo @videoAttributes={{this.attributes}} />`);
|
await render(hbs`<LazyVideo @videoAttributes={{this.attributes}} />`);
|
||||||
|
|
||||||
assert
|
assert
|
||||||
|
@ -320,10 +320,10 @@ RSpec.describe DiscourseWebauthn::AuthenticationService do
|
|||||||
# simulate missing user verification in the key data
|
# simulate missing user verification in the key data
|
||||||
# by setting third bit to 0
|
# by setting third bit to 0
|
||||||
flags = "10000010" # correct flag sequence is "10100010"
|
flags = "10000010" # correct flag sequence is "10100010"
|
||||||
overriden_auth_data = service.send(:auth_data)
|
overridden_auth_data = service.send(:auth_data)
|
||||||
overriden_auth_data[32] = [flags].pack("b*")
|
overridden_auth_data[32] = [flags].pack("b*")
|
||||||
|
|
||||||
service.instance_variable_set(:@auth_data, overriden_auth_data)
|
service.instance_variable_set(:@auth_data, overridden_auth_data)
|
||||||
|
|
||||||
expect { service.authenticate_security_key }.to raise_error(
|
expect { service.authenticate_security_key }.to raise_error(
|
||||||
DiscourseWebauthn::UserVerificationError,
|
DiscourseWebauthn::UserVerificationError,
|
||||||
|
@ -157,10 +157,10 @@ RSpec.describe DiscourseWebauthn::RegistrationService do
|
|||||||
it "raises a UserPresenceError" do
|
it "raises a UserPresenceError" do
|
||||||
# simulate missing user presence by flipping first bit to 0
|
# simulate missing user presence by flipping first bit to 0
|
||||||
flags = "00000010"
|
flags = "00000010"
|
||||||
overridenAuthData = service.send(:auth_data)
|
overriddenAuthData = service.send(:auth_data)
|
||||||
overridenAuthData[32] = [flags].pack("b*")
|
overriddenAuthData[32] = [flags].pack("b*")
|
||||||
|
|
||||||
service.instance_variable_set(:@auth_data, overridenAuthData)
|
service.instance_variable_set(:@auth_data, overriddenAuthData)
|
||||||
|
|
||||||
expect { service.register_security_key }.to raise_error(
|
expect { service.register_security_key }.to raise_error(
|
||||||
DiscourseWebauthn::UserPresenceError,
|
DiscourseWebauthn::UserPresenceError,
|
||||||
@ -213,10 +213,10 @@ RSpec.describe DiscourseWebauthn::RegistrationService do
|
|||||||
it "raises a UserVerificationError" do
|
it "raises a UserVerificationError" do
|
||||||
# simulate missing user verification by flipping third bit to 0
|
# simulate missing user verification by flipping third bit to 0
|
||||||
flags = "10000010" # correct flag sequence is "10100010"
|
flags = "10000010" # correct flag sequence is "10100010"
|
||||||
overriden_auth_data = service.send(:auth_data)
|
overridden_auth_data = service.send(:auth_data)
|
||||||
overriden_auth_data[32] = [flags].pack("b*")
|
overridden_auth_data[32] = [flags].pack("b*")
|
||||||
|
|
||||||
service.instance_variable_set(:@auth_data, overriden_auth_data)
|
service.instance_variable_set(:@auth_data, overridden_auth_data)
|
||||||
|
|
||||||
expect { service.register_security_key }.to raise_error(
|
expect { service.register_security_key }.to raise_error(
|
||||||
DiscourseWebauthn::UserVerificationError,
|
DiscourseWebauthn::UserVerificationError,
|
||||||
|
Reference in New Issue
Block a user