Skip to content
Snippets Groups Projects
Commit 4a13af7f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

unit test checking if menu is opened properly

parent b31b23a5
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!553Resolve "allow to open multiple data overlays using url GET param"
......@@ -45,6 +45,11 @@
height: 35px;
}
.minerva-header .minerva-menu-link {
padding-right: 5px;
float: right;
}
.minerva-checkbox-grid li {
display: block;
float: left;
......
......@@ -85,7 +85,7 @@ Header.prototype._createHeaderGui = function (guiParams) {
var menuLink = Functions.createElement({
type: "a",
style: "padding-right:5px; float:right",
className: "minerva-menu-link",
content: '<i class="fa fa-bars" style="font-size:17px"></i>&nbsp;',
href: "#",
onclick: function () {
......
......@@ -51,4 +51,24 @@ describe('Header', function () {
});
});
it('open menu', function () {
var map = helper.createCustomMap();
var header = new Header({
element: testDiv,
configuration: helper.getConfiguration(),
customMap: map,
optionsMenu: true
});
return header.init().then(function () {
assert.ok($(".dropdown-menu").css('display') === 'none');
return $(".minerva-menu-link", testDiv)[0].onclick();
}).then(function () {
assert.notOk($(".dropdown-menu").css('display') === 'none');
return header.destroy();
});
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment