How to use the react-dom/test-utils.isCompositeComponent function in react-dom

To help you get started, we’ve selected a few react-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 allegro / turnilo / src / client / components / date-range-picker / date-range-picker.mocha.tsx View on Github external
it("adds the correct class", () => {
    var renderedComponent = renderIntoDocument(
       {}}
        onEndChange={() => {}}
      />
    );

    expect(TestUtils.isCompositeComponent(renderedComponent), "should be composite").to.equal(true);
    expect(ReactDOM.findDOMNode(renderedComponent).className, "should contain class").to.contain("date-range-picker");
  });
  /* TODO: remove comments after the bug will be resolved https://github.com/chaijs/chai/pull/1071 */
github rsuite / rsuite / test / testUtils.js View on Github external
export function getDOMNode(children) {
  if (ReactTestUtils.isCompositeComponent(children)) {
    return findDOMNode(children);
  }

  return findDOMNode(getInstance(children));
}
github allegro / turnilo / src / client / components / date-range-input / date-range-input.mocha.tsx View on Github external
it("adds the correct class", () => {
    var renderedComponent = renderIntoDocument(
      
    );

    expect(TestUtils.isCompositeComponent(renderedComponent), "should be composite").to.equal(true);
    expect(ReactDOM.findDOMNode(renderedComponent).className, "should contain class").to.contain("date-range-input");
  });
github allegro / turnilo / src / client / views / home-view / home-view.mocha.tsx View on Github external
it("adds the correct class", () => {
    var renderedComponent = renderIntoDocument(
      
    );

    expect(TestUtils.isCompositeComponent(renderedComponent), "should be composite").to.equal(true);
    expect(ReactDOM.findDOMNode(renderedComponent).className, "should contain class").to.contain("home-view");
  });
github allegro / turnilo / src / client / components / pinboard-measure-tile / pinboard-measure-tile.mocha.tsx View on Github external
it("adds the correct class", () => {

    const essence = EssenceFixtures.wikiTotals();
    const sortOn = new SortOn(essence.dataCube.getDimension("articleName"));

    const renderedComponent = renderIntoDocument(
      
    );

    expect(TestUtils.isCompositeComponent(renderedComponent), "should be composite").to.equal(true);
    expect(ReactDOM.findDOMNode(renderedComponent).className, "should contain class").to.contain("pinboard-measure-tile");
  });
github allegro / turnilo / src / client / visualizations / totals / totals.mocha.tsx View on Github external
it("adds the correct class", () => {
    var renderedComponent = renderIntoDocument(
      
    );

    expect(TestUtils.isCompositeComponent(renderedComponent), "should be composite").to.equal(true);
    expect(ReactDOM.findDOMNode(renderedComponent).className, "should contain class").to.contain("totals");
  });
});
github allegro / turnilo / src / client / components / filter-options-dropdown / filter-options-dropdown.mocha.tsx View on Github external
it("adds the correct class", () => {
    var renderedComponent = renderIntoDocument(
       {}}
      />
    );

    expect(TestUtils.isCompositeComponent(renderedComponent), "should be composite").to.equal(true);
    expect(findDOMNode(renderedComponent).className, "should contain class").to.contain("filter-options-dropdown");
  });
github allegro / turnilo / src / client / components / filter-menu / string-filter-menu / string-filter-menu.mocha.tsx View on Github external
var renderedComponent = renderIntoDocument(
      
    );

    expect(TestUtils.isCompositeComponent(renderedComponent), "should be composite").to.equal(true);
    expect(ReactDOM.findDOMNode(renderedComponent).className, "should contain class").to.contain("string-filter-menu");
  });
github allegro / turnilo / src / client / views / link-view / link-view.mocha.tsx View on Github external
it.skip("adds the correct class", () => {
    var renderedComponent = renderIntoDocument(
      
    );

    expect(TestUtils.isCompositeComponent(renderedComponent), "should be composite").to.equal(true);
    expect(ReactDOM.findDOMNode(renderedComponent).className, "should contain class").to.contain("link-view");

  });
});