discourse/test/javascripts/acceptance/shared-drafts-test.js.es6

20 lines
545 B
Plaintext
Raw Normal View History

import { acceptance } from "helpers/qunit-helpers";
acceptance("Shared Drafts", { loggedIn: true });
2018-06-15 11:03:24 -04:00
QUnit.test("Viewing", assert => {
visit("/t/some-topic/9");
andThen(() => {
2018-06-15 11:03:24 -04:00
assert.ok(find(".shared-draft-controls").length === 1);
let categoryChooser = selectKit(".shared-draft-controls .category-chooser");
assert.equal(categoryChooser.header().value(), "3");
});
2018-06-15 11:03:24 -04:00
click(".publish-shared-draft");
click(".bootbox .btn-primary");
andThen(() => {
2018-06-15 11:03:24 -04:00
assert.ok(find(".shared-draft-controls").length === 0);
});
});