discourse/app/assets/javascripts/discourse/tests/acceptance/user-activity-drafts-test.js
Andrei Prigorshnev 477bbc372e
FEATURE: improve blank page syndrome on the user activity pages (#14311)
This improves blank page syndrome on the next pages:
* activity
* activity/replies
* activity/drafts
* activity/likes-given
2021-09-16 21:35:34 +04:00

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"));
});
});