mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
22ffcba8e6
- Includes acceptance tests for composer (post, edit) - Supports acceptance testing of bootbox
29 lines
929 B
JavaScript
29 lines
929 B
JavaScript
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
acceptance("Header (Staff)", { loggedIn: true });
|
|
|
|
test("header", () => {
|
|
visit("/");
|
|
|
|
// Notifications
|
|
click("#user-notifications");
|
|
andThen(() => {
|
|
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");
|
|
});
|
|
|
|
// Site Map
|
|
click("#site-map");
|
|
andThen(() => {
|
|
ok(exists("#site-map-dropdown .admin-link"), "it has the admin link");
|
|
ok(exists("#site-map-dropdown .flagged-posts.badge-notification"), "it displays flag notifications");
|
|
});
|
|
|
|
// User dropdown
|
|
click("#current-user");
|
|
andThen(() => {
|
|
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");
|
|
});
|
|
});
|