mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 18:02:45 +08:00
![Andrei Prigorshnev](/assets/img/avatar_default.png)
This improves blank page syndrome on the next pages: * activity * activity/replies * activity/drafts * activity/likes-given
21 lines
578 B
JavaScript
21 lines
578 B
JavaScript
import { acceptance, exists } from "../helpers/qunit-helpers";
|
|
import { test } from "qunit";
|
|
import { visit } from "@ember/test-helpers";
|
|
|
|
acceptance("User Activity / Drafts - empty state", function (needs) {
|
|
needs.user();
|
|
|
|
needs.pretender((server, helper) => {
|
|
const emptyResponse = { drafts: [] };
|
|
|
|
server.get("/drafts.json", () => {
|
|
return helper.response(emptyResponse);
|
|
});
|
|
});
|
|
|
|
test("It renders the empty state panel", async function (assert) {
|
|
await visit("/u/eviltrout/activity/drafts");
|
|
assert.ok(exists("div.empty-state"));
|
|
});
|
|
});
|