2019-06-06 16:47:10 +08:00
|
|
|
import selectKit from "helpers/select-kit-helper";
|
2018-03-14 03:59:12 +08:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
|
|
|
|
acceptance("Shared Drafts", { loggedIn: true });
|
|
|
|
|
2018-07-19 22:40:12 +08:00
|
|
|
QUnit.test("Viewing", async assert => {
|
|
|
|
await visit("/t/some-topic/9");
|
|
|
|
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-07-19 22:40:12 +08:00
|
|
|
await click(".publish-shared-draft");
|
|
|
|
await click(".bootbox .btn-primary");
|
2018-03-14 03:59:12 +08:00
|
|
|
|
2018-07-19 22:40:12 +08:00
|
|
|
assert.ok(find(".shared-draft-controls").length === 0);
|
2018-03-14 03:59:12 +08:00
|
|
|
});
|