We used many global functions to handle tests when they should be imported like other libraries in our application. This also gets us closer to the way Ember CLI prefers our tests to be laid out.
18 lines
622 B
JavaScript
18 lines
622 B
JavaScript
import { test } from "qunit";
|
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
|
|
|
acceptance("Shared Drafts", { loggedIn: true });
|
|
|
|
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");
|
|
|
|
await click(".publish-shared-draft");
|
|
await click(".bootbox .btn-primary");
|
|
|
|
assert.ok(find(".shared-draft-controls").length === 0);
|
|
});
|