mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
Re-add dashboard short links (#5398)
* Re-add dashboard short links * Make the short link available to all users * Include filters in the short link for dashboards * Remove duplicate key causing linter error * Change URL Short link button into a menu item with Modal * Split out tests, bind URL short link in constructor
This commit is contained in:
committed by
Maxime Beauchemin
parent
0aff8659d8
commit
aa9b30cf55
@@ -0,0 +1,27 @@
|
||||
import React from 'react';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import { expect } from 'chai';
|
||||
import { describe, it } from 'mocha';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import URLShortLinkModal from '../../../src/components/URLShortLinkModal';
|
||||
import ModalTrigger from '../../../src/components/ModalTrigger';
|
||||
|
||||
describe('URLShortLinkModal', () => {
|
||||
const defaultProps = {
|
||||
url: 'mockURL',
|
||||
emailSubject: 'Mock Subject',
|
||||
emailContent: 'mock content',
|
||||
};
|
||||
|
||||
function setup() {
|
||||
const mockStore = configureStore([]);
|
||||
const store = mockStore({});
|
||||
return shallow(<URLShortLinkModal {...defaultProps} />, { context: { store } }).dive();
|
||||
}
|
||||
|
||||
it('renders ModalTrigger', () => {
|
||||
const wrapper = setup();
|
||||
expect(wrapper.find(ModalTrigger)).have.length(1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user