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

clearing db results clears left panel as well

parent fee05e3f
No related branches found
No related tags found
1 merge request!39Resolve "'Clear' button function incomplete"
......@@ -57,6 +57,10 @@ AbstractPanel.prototype._createEventHandlers = function() {
return self.refreshSearchResults();
});
self.getOverlayDb().addListener("onClear", function() {
searchInput.value = "";
});
};
AbstractPanel.prototype._initializeGui = function() {
......
......@@ -165,6 +165,7 @@ describe('SearchPanel', function() {
assert.ok(panel.createReactionElement(reaction).innerHTML.indexOf(reactionType) >= 0);
});
});
describe('createAliasElement', function() {
it('full name in desc', function() {
var map = helper.createCustomMap();
......@@ -184,4 +185,21 @@ describe('SearchPanel', function() {
});
});
describe('clear', function() {
it('input text', function() {
var map = helper.createCustomMap();
helper.createSearchDbOverlay(map);
var panel = new SearchPanel({
element : testDiv,
customMap : map
});
$(".typeahead", testDiv)[0].value = "some input";
return map.clearDbOverlays().then(function (){
assert.equal("",$(":input", testDiv)[0].value);
});
});
});
});
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