2018-03-13 14:59:12 -05:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
|
|
|
|
acceptance("Shared Drafts", { loggedIn: true });
|
|
|
|
|
2018-07-19 09:40:12 -05: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-13 14:59:12 -05:00
|
|
|
|
2018-07-19 09:40:12 -05:00
|
|
|
await click(".publish-shared-draft");
|
|
|
|
await click(".bootbox .btn-primary");
|
2018-03-13 14:59:12 -05:00
|
|
|
|
2018-07-19 09:40:12 -05:00
|
|
|
assert.ok(find(".shared-draft-controls").length === 0);
|
2018-03-13 14:59:12 -05:00
|
|
|
});
|