mirror of
https://github.com/hanzoai/forum.git
synced 2026-09-30 21:51:19 +00:00
25 lines
785 B
JavaScript
25 lines
785 B
JavaScript
import { click, visit } from "@ember/test-helpers";
|
|
import { test } from "qunit";
|
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
|
|
|
acceptance("Pending posts - no existing pending posts", function (needs) {
|
|
needs.user();
|
|
|
|
test("No link to pending posts", async function (assert) {
|
|
await visit("/u/eviltrout");
|
|
assert
|
|
.dom(".action-list [href='/u/eviltrout/activity/pending']")
|
|
.doesNotExist();
|
|
});
|
|
});
|
|
|
|
acceptance("Pending posts - existing pending posts", function (needs) {
|
|
needs.user({ pending_posts_count: 2 });
|
|
|
|
test("Navigate to pending posts", async function (assert) {
|
|
await visit("/u/eviltrout");
|
|
await click("[href='/u/eviltrout/activity/pending']");
|
|
assert.dom(".user-stream-item").exists({ count: 2 });
|
|
});
|
|
});
|