mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Ensure local date format shortcuts work correctly (#18541)
Followup to 03b7b7d1bc
This commit is contained in:
@@ -309,7 +309,7 @@ export default Component.extend({
|
|||||||
@action
|
@action
|
||||||
updateFormat(format, event) {
|
updateFormat(format, event) {
|
||||||
event?.preventDefault();
|
event?.preventDefault();
|
||||||
this.format = format;
|
this.set("format", format);
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
|||||||
@@ -9,7 +9,10 @@ import selectKit from "discourse/tests/helpers/select-kit-helper";
|
|||||||
|
|
||||||
acceptance("Local Dates - composer", function (needs) {
|
acceptance("Local Dates - composer", function (needs) {
|
||||||
needs.user();
|
needs.user();
|
||||||
needs.settings({ discourse_local_dates_enabled: true });
|
needs.settings({
|
||||||
|
discourse_local_dates_enabled: true,
|
||||||
|
discourse_local_dates_default_formats: "LLL|LTS|LL|LLLL",
|
||||||
|
});
|
||||||
|
|
||||||
test("composer bbcode", async function (assert) {
|
test("composer bbcode", async function (assert) {
|
||||||
const getAttr = (attr) => {
|
const getAttr = (attr) => {
|
||||||
@@ -121,5 +124,11 @@ acceptance("Local Dates - composer", function (needs) {
|
|||||||
query(".pika-table .is-selected"),
|
query(".pika-table .is-selected"),
|
||||||
"deleting selected TO date works"
|
"deleting selected TO date works"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await click(".advanced-mode-btn");
|
||||||
|
|
||||||
|
assert.strictEqual(query("input.format-input").value, "");
|
||||||
|
await click("ul.formats a.moment-format");
|
||||||
|
assert.strictEqual(query("input.format-input").value, "LLL");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user