mirror of
https://github.com/apache/superset.git
synced 2026-04-23 01:55:09 +00:00
[explore] refactor slice action button group (#1074)
* pull explore actions button group into component * use button component * make sure we render all action buttons * test that embed code is correct * don't need before each * generalize modal trigger for use with plain links or icons
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import React from 'react';
|
||||
import { expect } from 'chai';
|
||||
import { describe, it } from 'mocha';
|
||||
|
||||
import CopyToClipboard from '../../../javascripts/components/CopyToClipboard';
|
||||
|
||||
describe('CopyToClipboard', () => {
|
||||
const defaultProps = {
|
||||
text: 'some text to copy',
|
||||
};
|
||||
|
||||
it('renders', () => {
|
||||
expect(
|
||||
React.isValidElement(<CopyToClipboard {...defaultProps} />)
|
||||
).to.equal(true);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
import { expect } from 'chai';
|
||||
import { describe, it } from 'mocha';
|
||||
|
||||
import ModalTrigger from '../../../javascripts/components/ModalTrigger';
|
||||
|
||||
describe('ModalTrigger', () => {
|
||||
const defaultProps = {
|
||||
triggerNode: <i className="fa fa-link" />,
|
||||
modalTitle: 'My Modal Title',
|
||||
modalBody: <div>Modal Body</div>,
|
||||
};
|
||||
|
||||
it('renders', () => {
|
||||
expect(
|
||||
React.isValidElement(<ModalTrigger {...defaultProps} />)
|
||||
).to.equal(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user