Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should undo', inject(function(commandStack) {
// undo/redo for every field change
commandStack.undo();
commandStack.undo();
expect(domClasses(eventType).has('bpp-hidden')).to.be.true;
expect(domClasses(listenerType).has('bpp-hidden')).to.be.true;
expect(domClasses(listenerValue.parentElement).has('bpp-hidden')).to.be.true;
}));
return inject(function(propertiesPanel, selection, elementRegistry) {
var field = getter(propertiesPanel._container, inputNode);
if (parentElement) {
field = field.parentElement;
}
// then
if (visible) {
expect(field).to.exist;
} else {
expect(domClasses(field).has('bpp-hidden')).to.be.true;
}
});
}
return inject(function(propertiesPanel, selection, elementRegistry) {
var field = getter(propertiesPanel._container, inputNode);
if (parentElement) {
field = field.parentElement;
}
// then
if (visible) {
expect(field).to.exist;
} else {
expect(domClasses(field).has('bpp-hidden')).to.be.true;
}
});
}
function checkActiveTabVisibility(node, visible) {
var isActive = domClasses(node).has('bpp-active');
if (!visible && isActive) {
self.activateTab(current.tabs[0]);
}
}
groupNode.addEventListener('click', function(evt) {
if (!evt.defaultPrevented && domClasses(groupNode).has('group-closed')) {
domClasses(groupNode).remove('group-closed');
}
});