mirror of
https://ghfast.top/https://github.com/discourse/discourse-animated-avatars.git
synced 2026-07-15 11:37:01 +08:00
24 lines
871 B
JavaScript
24 lines
871 B
JavaScript
import { visit } from "@ember/test-helpers";
|
|
import { test } from "qunit";
|
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
|
import Topics from "../fixtures/topic-fixtures";
|
|
|
|
acceptance("Animated avatars topic tests", function (needs) {
|
|
needs.pretender((server, helper) => {
|
|
const topicPath = "/t/1000.json";
|
|
const topicResponse = Topics[topicPath];
|
|
server.get(topicPath, () => helper.response(topicResponse));
|
|
});
|
|
|
|
test("does not have animated class with no animated avatar", async function (assert) {
|
|
await visit("/t/-/280");
|
|
assert
|
|
.dom(".animated-avatar")
|
|
.doesNotExist("does not add an animated-avatar class");
|
|
});
|
|
|
|
test("has animated class when animated avatar", async function (assert) {
|
|
await visit("/t/-/1000");
|
|
assert.dom(".animated-avatar").exists("adds an animated-avatar class");
|
|
});
|
|
});
|