discourse/test/javascripts/acceptance/header-test-staff.js.es6

23 lines
687 B
Plaintext
Raw Normal View History

import { acceptance } from "helpers/qunit-helpers";
acceptance("Header (Staff)", { loggedIn: true });
2014-08-01 02:17:18 +08:00
test("header", () => {
2014-08-01 02:17:18 +08:00
visit("/");
// Notifications
click("#user-notifications");
andThen(() => {
2014-08-01 02:17:18 +08:00
var $items = $("#notifications-dropdown li");
ok(exists($items), "is lazily populated after user opens it");
ok($items.first().hasClass("read"), "correctly binds items' 'read' class");
});
// User dropdown
click("#current-user");
andThen(() => {
2014-08-01 02:17:18 +08:00
ok(exists("#user-dropdown:visible"), "is lazily rendered after user opens it");
ok(exists("#user-dropdown .user-dropdown-links"), "has showing / hiding user-dropdown links correctly bound");
});
});