Sha256: 119186827f613973b20a04f8c33fdf001e708baab3196a442bccf98ba3c15e4b
Contents?: true
Size: 994 Bytes
Versions: 14
Compression:
Stored size: 994 Bytes
Contents
describe("App.Components.Revelry.Index", function() { var Utils = React.addons.TestUtils; var Simulate = Utils.Simulate; var main; beforeEach(function() { var tmp = React.createElement(App.Components.Main, { path: 'revelry/index', options: { meta: { csrf_token: 'crappy token', }, }, }); main = Utils.renderIntoDocument(tmp); }); it("has a functioning Modal example", function() { var modalsExample = Utils.findRenderedComponentWithType(main, Rev.Examples.Modals) var modal = Utils.findRenderedComponentWithType(modalsExample, Rev.Components.Modal) expect(modal.props.isOpen).toEqual(false) var button = Utils.findRenderedDOMComponentWithTag(modalsExample, 'button') Simulate.click(button) expect(modal.props.isOpen).toEqual(true) var otherButton = Utils.findRenderedDOMComponentWithTag(modal, 'button') Simulate.click(otherButton) expect(modal.props.isOpen).toEqual(false) }) });
Version data entries
14 entries across 12 versions & 1 rubygems