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

Version Path
revelry_core-0.1.24.0 spec/javascripts/components/revelry/index_spec.js
revelry_core-0.1.23.0 spec/javascripts/components/revelry/index_spec.js
revelry_core-0.1.22.0 spec/javascripts/components/revelry/index_spec.js
revelry_core-0.1.21.0 spec/javascripts/components/revelry/index_spec.js
revelry_core-0.1.20.0 spec/javascripts/components/revelry/index_spec.js
revelry_core-0.1.19.0 spec/javascripts/components/revelry/index_spec.js
revelry_core-0.1.18.0 spec/javascripts/components/revelry/index_spec.js
revelry_core-0.1.17.0 spec/javascripts/components/revelry/index_spec.js
revelry_core-0.1.16.0 spec/javascripts/components/revelry/index_spec.js
revelry_core-0.1.15.0 spec/javascripts/components/revelry/index_spec.js
revelry_core-0.1.14.0 spec/javascripts/components/revelry/index_spec.js
revelry_core-0.1.14.0 spec/dummy/tmp/jasmine/assets/components/revelry/index_spec.self.js
revelry_core-0.1.13.0 spec/javascripts/components/revelry/index_spec.js
revelry_core-0.1.13.0 spec/dummy/tmp/jasmine/assets/components/revelry/index_spec.self.js