mirror of
https://github.com/apache/superset.git
synced 2026-04-09 03:16:07 +00:00
committed by
GitHub
parent
91db008d72
commit
ad4ca2223e
@@ -86,8 +86,12 @@ describe('EmbedCodeButton', () => {
|
||||
const stub = sinon
|
||||
.stub(exploreUtils, 'getURIDirectory')
|
||||
.callsFake(() => 'endpoint_url');
|
||||
const wrapper = mount(<EmbedCodeButton {...defaultProps} />);
|
||||
wrapper.setState({
|
||||
const wrapper = mount(
|
||||
<ThemeProvider theme={supersetTheme}>
|
||||
<EmbedCodeButton {...defaultProps} />
|
||||
</ThemeProvider>,
|
||||
);
|
||||
wrapper.find(EmbedCodeButton).setState({
|
||||
height: '1000',
|
||||
width: '2000',
|
||||
shortUrlId: 100,
|
||||
@@ -104,7 +108,9 @@ describe('EmbedCodeButton', () => {
|
||||
}${DashboardStandaloneMode.HIDE_NAV}&height=1000"\n` +
|
||||
`>\n` +
|
||||
`</iframe>`;
|
||||
expect(wrapper.instance().generateEmbedHTML()).toBe(embedHTML);
|
||||
expect(wrapper.find(EmbedCodeButton).instance().generateEmbedHTML()).toBe(
|
||||
embedHTML,
|
||||
);
|
||||
stub.restore();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user