mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 04:53:51 +08:00
26 lines
699 B
JavaScript
26 lines
699 B
JavaScript
import { acceptance } from "helpers/qunit-helpers";
|
|
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
|
|
|
|
acceptance("Local Dates", {
|
|
loggedIn: true,
|
|
settings: { discourse_local_dates_enabled: true },
|
|
beforeEach() {
|
|
clearPopupMenuOptionsCallback();
|
|
}
|
|
});
|
|
|
|
test("local dates bbcode", async assert => {
|
|
await visit("/");
|
|
await click("#create-topic");
|
|
|
|
await fillIn(
|
|
".d-editor-input",
|
|
'[date=2017-10-23 time=01:30:00 format="LL" timezone="Asia/Calcutta" timezones="Europe/Paris|America/Los_Angeles"]'
|
|
);
|
|
|
|
assert.ok(
|
|
exists(".d-editor-preview .discourse-local-date.past.cooked-date"),
|
|
"it should contain the cooked date output"
|
|
);
|
|
});
|