discourse/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-test.js.es6
2018-10-12 03:32:38 +05:30

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"
);
});