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