mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
URL shortner for dashboards (#4760)
* Added support for URLShortLinkButton to work for the dashboard case * Fix lint errors and test * Change references to 'slice' to 'chart'. * Add unit tests to improve coverage * Fixing lint errors * Refactor to make URLShortLink more generic. Remove history modification code, redirect should be handling this. * Remove history modification code, redirect should be handling this * Generate a shorter link without the directory, and delegate default linked to the contents of window.location * Fix lint errors * Fix test_shortner test to check for new pattern * Remove usage of addHistory to manipulate explore shortlink redirection * Address build failure and using better practices for shortlink defaults * Fixing alphabetical order * More syntax mistakes * Revert explore view history changes * Fix use of component props, & rebase
This commit is contained in:
committed by
Hugh A. Miles II
parent
cc0942ac98
commit
dc21e0dd78
@@ -1,23 +0,0 @@
|
||||
import React from 'react';
|
||||
import { expect } from 'chai';
|
||||
import { describe, it } from 'mocha';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import { OverlayTrigger } from 'react-bootstrap';
|
||||
import URLShortLinkButton from '../../../../src/explore/components/URLShortLinkButton';
|
||||
|
||||
describe('URLShortLinkButton', () => {
|
||||
const defaultProps = {
|
||||
slice: {
|
||||
querystring: () => 'query string',
|
||||
},
|
||||
};
|
||||
|
||||
it('renders', () => {
|
||||
expect(React.isValidElement(<URLShortLinkButton {...defaultProps} />)).to.equal(true);
|
||||
});
|
||||
it('renders OverlayTrigger', () => {
|
||||
const wrapper = shallow(<URLShortLinkButton {...defaultProps} />);
|
||||
expect(wrapper.find(OverlayTrigger)).have.length(1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user