1
0
mirror of synced 2026-08-05 01:36:54 +00:00

FEATURE: improve blank page syndrome (#168)

This commit is contained in:
Andrei Prigorshnev
2021-09-28 19:22:08 +04:00
committed by GitHub
parent 55cb184f7e
commit 473c530018
3 changed files with 38 additions and 0 deletions
@@ -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"));
});
}
);