mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-25 08:39:38 -05:00
40 lines
1.2 KiB
Text
40 lines
1.2 KiB
Text
|
import { acceptance } from "helpers/qunit-helpers";
|
||
|
|
||
|
acceptance("Hamburger Menu");
|
||
|
|
||
|
test("Toggle Menu", (assert) => {
|
||
|
visit("/");
|
||
|
andThen(() => {
|
||
|
assert.ok(exists("#hamburger-menu.slideright"), "hidden by default");
|
||
|
});
|
||
|
|
||
|
click("#toggle-hamburger-menu");
|
||
|
andThen(() => {
|
||
|
assert.ok(!exists("#hamburger-menu.slideright"), "a click makes it appear");
|
||
|
});
|
||
|
|
||
|
click(".close-hamburger");
|
||
|
andThen(() => {
|
||
|
assert.ok(exists("#hamburger-menu.slideright"), "clicking the X hides it");
|
||
|
});
|
||
|
});
|
||
|
|
||
|
test("Menu Items", (assert) => {
|
||
|
visit("/");
|
||
|
click("#toggle-hamburger-menu");
|
||
|
andThen(() => {
|
||
|
assert.ok(!exists("#hamburger-menu .admin-link"));
|
||
|
assert.ok(!exists("#hamburger-menu .flagged-posts-link"));
|
||
|
|
||
|
assert.ok(exists("#hamburger-menu .latest-topics-link"));
|
||
|
assert.ok(exists("#hamburger-menu .badge-link"));
|
||
|
assert.ok(exists("#hamburger-menu .user-directory-link"));
|
||
|
assert.ok(exists("#hamburger-menu .keyboard-shortcuts-link"));
|
||
|
assert.ok(exists("#hamburger-menu .faq-link"));
|
||
|
assert.ok(exists("#hamburger-menu .about-link"));
|
||
|
assert.ok(exists("#hamburger-menu .categories-link"));
|
||
|
|
||
|
assert.ok(exists('#hamburger-menu .category-link'));
|
||
|
});
|
||
|
});
|