FEATURE: improve blank page syndrome (#168)
This commit is contained in:
committed by
GitHub
parent
55cb184f7e
commit
473c530018
@@ -0,0 +1,28 @@
|
||||
import { acceptance, exists } from "discourse/tests/helpers/qunit-helpers";
|
||||
import { test } from "qunit";
|
||||
import { visit } from "@ember/test-helpers";
|
||||
|
||||
acceptance(
|
||||
"Discourse Solved Plugin | activity/solved | empty state",
|
||||
function (needs) {
|
||||
needs.user();
|
||||
|
||||
needs.pretender((server, helper) => {
|
||||
const emptyResponse = { user_actions: [] };
|
||||
|
||||
server.get("/user_actions.json", () => {
|
||||
return helper.response(emptyResponse);
|
||||
});
|
||||
});
|
||||
|
||||
test("When looking at own activity it renders the empty state panel", async function (assert) {
|
||||
await visit("/u/eviltrout/activity/solved");
|
||||
assert.ok(exists("div.empty-state"));
|
||||
});
|
||||
|
||||
test("When looking at another user's activity it renders the 'No activity' message", async function (assert) {
|
||||
await visit("/u/charlie/activity/solved");
|
||||
assert.ok(exists("div.alert-info"));
|
||||
});
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user