mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:21:12 +08:00
Add qunit test and fix the rspec method
This commit is contained in:
@ -0,0 +1,25 @@
|
||||
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"
|
||||
);
|
||||
});
|
Reference in New Issue
Block a user