Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('is an element', function() {
var TestUtils = require('react-addons-test-utils');
var Appbar = require('../../app/client/components/Appbar');
assert.equal(true,TestUtils.isElementOfType(,Appbar));
// // Render a checkbox with label in the document
// var checkbox = TestUtils.renderIntoDocument(
//
// );
// // Verify that it's Off by default
// var label = TestUtils.findRenderedDOMComponentWithTag(
// checkbox, 'label');
// assert.equal(label.getDOMNode().textContent, 'Off');
// // Simulate a click and verify that it is now On
// var input = TestUtils.findRenderedDOMComponentWithTag(
// checkbox, 'input');
// TestUtils.Simulate.change(input);
// assert.equal(label.getDOMNode().textContent, 'On');
it('should provide column with a filterableHeaderRenderer', () => {
let headerCells = TestUtils.scryRenderedComponentsWithType(headerRow, HeaderCellStub);
expect(TestUtils.isElementOfType(headerCells[sortableAndFilterableColIdx].props.renderer, FilterableHeaderCellStub)).toBe(true);
});
});
it('should render custom column header', () => {
let headerCells = TestUtils.scryRenderedComponentsWithType(headerRow, HeaderCellStub);
expect(TestUtils.isElementOfType(headerCells[customColumnIdx].props.renderer, CustomHeaderStub)).toBe(true);
});
it('should render component', () => {
expect(TestUtils.isElementOfType(component), Wavesurfer);
});
it( 'should contain children', () => {
expect( typeof TestUtils.isElementOfType( component.props.children ) !== 'undefined' ).to.be.true;
});
});
test('is properly shaped', (t) => {
const component = utils.shallowlyRenderedOutput(<div>)
t.truthy(component.type === 'div', 'should have a div as container')
t.truthy(typeof TestUtils.isElementOfType(component.props.children) !== 'undefined', 'should contain children')
})
</div>
it('should render component', () => {
expect(TestUtils.isElementOfType(component), Speech);
});
it('should provide column with a sortableHeaderRenderer', () => {
let headerCells = TestUtils.scryRenderedComponentsWithType(headerRow, HeaderCellStub);
expect(TestUtils.isElementOfType(headerCells[sortableColIdx].props.renderer, SortableHeaderCellStub)).toBe(true);
});
return this.findBy(e => e.componentInstance &&
TestUtils.isElementOfType(e.componentInstance, componentClass));
}
_.forEach(labelElements, (labelElement) => {
assert(isElementOfType(labelElement, LabeledField.Label));
});