Clean up clicking outside the hamburger, add test

This commit is contained in:
Robin Ward
2015-08-26 12:27:30 -04:00
parent e98c354c2d
commit 9760369e4c
3 changed files with 25 additions and 22 deletions

View File

@ -17,6 +17,17 @@ test("Toggle Menu", (assert) => {
andThen(() => {
assert.ok(exists("#hamburger-menu.slideright"), "clicking the X hides it");
});
click("#toggle-hamburger-menu");
andThen(() => {
assert.ok(!exists("#hamburger-menu.slideright"), "it opens again");
});
click('#main-outlet')
andThen(() => {
assert.ok(exists("#hamburger-menu.slideright"), "clicking the body hides the menu");
});
});
test("Menu Items", (assert) => {