How to use min-dom - 10 common examples

To help you get started, we’ve selected a few min-dom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / JobPrioritySpec.js View on Github external
it('should fetch a job priority for an element', inject(function(propertiesPanel, selection, elementRegistry) {

    // given
    var shape = elementRegistry.get('ServiceTask'),
        inputEl = 'input[name=jobPriority]';

    // when
    selection.select(shape);
    var bo = getBusinessObject(shape),
        inputValue = domQuery(inputEl, propertiesPanel._container).value;

    // then
    expect(bo.get('jobPriority')).to.equal(inputValue);
  }));
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / HistoryTimeToLiveSpec.js View on Github external
it('should get a history time to live for a process', inject(function(propertiesPanel, selection, elementRegistry) {

      // given
      var shape = elementRegistry.get('Process_1'),
          inputEl = 'input[name=historyTimeToLive]';

      // when
      selection.select(shape);

      var bo = getBusinessObject(shape),
          inputValue = domQuery(inputEl, propertiesPanel._container).value;

      // then
      expect(bo.get('historyTimeToLive')).to.equal(inputValue);
    }));
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / CandidateStarterSpec.js View on Github external
it('should get candidate starter groups for a process', inject(function(propertiesPanel, selection, elementRegistry) {

      // given
      var shape = elementRegistry.get('Process_1'),
          inputEl = 'input[name=candidateStarterGroups]';

      // when
      selection.select(shape);

      var bo = getBusinessObject(shape),
          inputValue = domQuery(inputEl, propertiesPanel._container).value;

      // then
      expect(bo.get('candidateStarterGroups')).to.equal(inputValue);
    }));
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / bpmn / ConditionalEventDefinitionSpec.js View on Github external
it('should get existing variableName (parent: event sub process)', inject(function(propertiesPanel, selection, elementRegistry) {

      // given
      var shape = elementRegistry.get('StartEvent_3');
      var bo = getBusinessObject(shape);

      // when
      selection.select(shape);

      var textField = domQuery('input[name=variableName]', propertiesPanel._container);

      // then
      expect(textField.value).to.equal(bo.eventDefinitions[0].get('camunda:variableName'));

    }));
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / ExecutionListenerPropertiesSpec.js View on Github external
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;

        }));
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / FieldInjectionSpec.js View on Github external
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;
        }
      });
    }
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / ListenerFieldInjectionSpec.js View on Github external
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;
        }
      });
    }
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / RetryTimeCycleSpec.js View on Github external
it('should fetch a retry time cycle for an element with timer def', inject(function(propertiesPanel, selection, elementRegistry) {

    var shape = elementRegistry.get('BoundaryEvent'),
        inputEl = 'div[data-entry=retryTimeCycle] input[name=cycle]';

    selection.select(shape);

    var bo = getBusinessObject(shape),
        inputValue = domQuery(inputEl, propertiesPanel._container).value;

    var retryTimer = bo.get('extensionElements').get('values')[1];

    expect(retryTimer.get('body')).to.equal(inputValue);
    expect(retryTimer.get('body')).to.equal('asd');
  }));
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / bpmn / ErrorEventDefinitionSpec.js View on Github external
function getInputField(container, entryId, inputName) {
  var selector = 'input' + (inputName ? '[name="' + inputName + '"]' : '');
  return domQuery(selector, getEntry(container, entryId));
}
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / bpmn / TimerEventDefinitionSpec.js View on Github external
function getInputField(container, entryId, inputName) {
  var selector = 'input' + (inputName ? '[name="' + inputName + '"]' : '');
  return domQuery(selector, getEntry(container, entryId));
}

min-dom

A minimal dom utility toolbelt

MIT
Latest version published 2 months ago

Package Health Score

78 / 100
Full package analysis