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

unit test for init contextmenu added

parent 34548d4d
No related branches found
No related tags found
1 merge request!5Frontend refactor
......@@ -26,7 +26,13 @@ MapContextMenu.prototype._createMapContextMenuGui = function() {
self.addOption("Select mode", function() {
return self.getMap().turnOnOffDrawing();
});
};
MapContextMenu.prototype.init = function() {
var self = this;
return self.createExportAsImageSubmenu().then(function(submenu){
self.addOption(submenu);
});
};
module.exports = MapContextMenu;
......@@ -30,6 +30,16 @@ describe('MapContextMenu', function() {
assert.equal(logger.getWarnings().length, 0);
});
it('init', function() {
var map = helper.createCustomMap();
var menu = new MapContextMenu({
element : testDiv,
customMap : map
});
return menu.init();
});
it('open comment dialog', function() {
var map;
return ServerConnector.getProject().then(function(project) {
......
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