mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 03:16:41 +08:00
FIX: Ensure local date format shortcuts work correctly (#18541)
Followup to 03b7b7d1bc
This commit is contained in:
parent
36f7fbebdc
commit
a0eb8092f0
|
@ -309,7 +309,7 @@ export default Component.extend({
|
|||
@action
|
||||
updateFormat(format, event) {
|
||||
event?.preventDefault();
|
||||
this.format = format;
|
||||
this.set("format", format);
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
|
|
@ -9,7 +9,10 @@ import selectKit from "discourse/tests/helpers/select-kit-helper";
|
|||
|
||||
acceptance("Local Dates - composer", function (needs) {
|
||||
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) {
|
||||
const getAttr = (attr) => {
|
||||
|
@ -121,5 +124,11 @@ acceptance("Local Dates - composer", function (needs) {
|
|||
query(".pika-table .is-selected"),
|
||||
"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");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user