mirror of
https://github.com/apache/superset.git
synced 2026-04-11 04:15:33 +00:00
[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:
committed by
GitHub
parent
bf67d64708
commit
d929bbfe30
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user