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