[explorev2] making QueryAndSaveBtns disabled while running queries (#1841)

As I altered QueryAndSaveBtns to add the `disabled` prop
I also moved it to using react-boostrap
This commit is contained in:
Maxime Beauchemin
2016-12-15 08:53:33 -08:00
committed by GitHub
parent bf67d64708
commit d929bbfe30
3 changed files with 27 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
import React from 'react';
import { beforeEach, describe, it } from 'mocha';
import { Button } from 'react-bootstrap';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import sinon from 'sinon';
@@ -26,12 +27,12 @@ describe('QueryAndSaveButtons', () => {
});
it('renders 2 buttons', () => {
expect(wrapper.find('button')).to.have.lengthOf(2);
expect(wrapper.find(Button)).to.have.lengthOf(2);
});
it('renders buttons with correct text', () => {
expect(wrapper.find('button').contains(' Query')).to.eql(true);
expect(wrapper.find('button').contains(' Save as')).to.eql(true);
expect(wrapper.find(Button).contains(' Query')).to.eql(true);
expect(wrapper.find(Button).contains(' Save as')).to.eql(true);
});
it('calls onQuery when query button is clicked', () => {