superset/superset-frontend/spec/javascripts/components/URLShortLinkButton_spec.jsx

46 lines
1.5 KiB
React
Raw Normal View History

/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react';
import configureStore from 'redux-mock-store';
Explore view save modal spec (#3110) * split reducer logic for ExploreViewContainer * fix saveModal component and unit tests * revert changes in SaveModal_spec. will make another commit just to improve test coverage for SaveModal component. * improve test coverage for explore view components: - SaveModal component - URLShortLinkButton * remove comment-out code * [bugfix] wrong 'Cant have overlap between Series and Breakdowns' (#3254) * [explore] make edit datasource a basic link (#3244) * Relying on FAB for font-awesome.min.css (#3261) * Modernize SQLA pessimistic handling (#3256) Looks like SQLAlchemy has redefined the best practice around pessimistic connection handling. * [webpack] break CSS and JS files while webpackin' (#3262) * [webpack] break CSS and JS files while webpackin' * cleaning up some templates * Fix pylint issue * import logging (#3264) * [bugfix] preserve order in groupby (#3268) Recently in https://github.com/apache/incubator-superset/commit/4c3313b01cb508ced8519a68f6479db423974929 I introduced an issue where the order of groupby fields might change. This addresses this issue and will preserve ordering. * Explicitly add Flask as dependancy (#3252) * Use sane Celery defaults to prevent tasks from being delayed (#3267) * Improve the chart type of Visualize in sqllab (#3241) * Improve the chart type of Visualize in sqllab & Add some css & Fix the link address in the navbar * add vizTypes filter * Set default ports Druid (#3266) For Druid set the default port for the broker and coordinator. * [explore] Split large reducer logic in ExploreViewContainer (#3088) * split reducer logic for ExploreViewContainer * fix saveModal component and unit tests * revert changes in SaveModal_spec. will make another commit just to improve test coverage for SaveModal component. * remove comment-out code * fix merge confilicts
2017-08-10 20:04:44 -04:00
import { shallow } from 'enzyme';
import Popover from 'src/common/components/Popover';
import URLShortLinkButton from 'src/components/URLShortLinkButton';
describe('URLShortLinkButton', () => {
const defaultProps = {
url: 'mockURL',
emailSubject: 'Mock Subject',
emailContent: 'mock content',
};
function setup() {
const mockStore = configureStore([]);
const store = mockStore({});
return shallow(<URLShortLinkButton {...defaultProps} />, {
context: { store },
}).dive();
}
Explore view save modal spec (#3110) * split reducer logic for ExploreViewContainer * fix saveModal component and unit tests * revert changes in SaveModal_spec. will make another commit just to improve test coverage for SaveModal component. * improve test coverage for explore view components: - SaveModal component - URLShortLinkButton * remove comment-out code * [bugfix] wrong 'Cant have overlap between Series and Breakdowns' (#3254) * [explore] make edit datasource a basic link (#3244) * Relying on FAB for font-awesome.min.css (#3261) * Modernize SQLA pessimistic handling (#3256) Looks like SQLAlchemy has redefined the best practice around pessimistic connection handling. * [webpack] break CSS and JS files while webpackin' (#3262) * [webpack] break CSS and JS files while webpackin' * cleaning up some templates * Fix pylint issue * import logging (#3264) * [bugfix] preserve order in groupby (#3268) Recently in https://github.com/apache/incubator-superset/commit/4c3313b01cb508ced8519a68f6479db423974929 I introduced an issue where the order of groupby fields might change. This addresses this issue and will preserve ordering. * Explicitly add Flask as dependancy (#3252) * Use sane Celery defaults to prevent tasks from being delayed (#3267) * Improve the chart type of Visualize in sqllab (#3241) * Improve the chart type of Visualize in sqllab & Add some css & Fix the link address in the navbar * add vizTypes filter * Set default ports Druid (#3266) For Druid set the default port for the broker and coordinator. * [explore] Split large reducer logic in ExploreViewContainer (#3088) * split reducer logic for ExploreViewContainer * fix saveModal component and unit tests * revert changes in SaveModal_spec. will make another commit just to improve test coverage for SaveModal component. * remove comment-out code * fix merge confilicts
2017-08-10 20:04:44 -04:00
it('renders OverlayTrigger', () => {
const wrapper = setup();
expect(wrapper.find(Popover)).toExist();
Explore view save modal spec (#3110) * split reducer logic for ExploreViewContainer * fix saveModal component and unit tests * revert changes in SaveModal_spec. will make another commit just to improve test coverage for SaveModal component. * improve test coverage for explore view components: - SaveModal component - URLShortLinkButton * remove comment-out code * [bugfix] wrong 'Cant have overlap between Series and Breakdowns' (#3254) * [explore] make edit datasource a basic link (#3244) * Relying on FAB for font-awesome.min.css (#3261) * Modernize SQLA pessimistic handling (#3256) Looks like SQLAlchemy has redefined the best practice around pessimistic connection handling. * [webpack] break CSS and JS files while webpackin' (#3262) * [webpack] break CSS and JS files while webpackin' * cleaning up some templates * Fix pylint issue * import logging (#3264) * [bugfix] preserve order in groupby (#3268) Recently in https://github.com/apache/incubator-superset/commit/4c3313b01cb508ced8519a68f6479db423974929 I introduced an issue where the order of groupby fields might change. This addresses this issue and will preserve ordering. * Explicitly add Flask as dependancy (#3252) * Use sane Celery defaults to prevent tasks from being delayed (#3267) * Improve the chart type of Visualize in sqllab (#3241) * Improve the chart type of Visualize in sqllab & Add some css & Fix the link address in the navbar * add vizTypes filter * Set default ports Druid (#3266) For Druid set the default port for the broker and coordinator. * [explore] Split large reducer logic in ExploreViewContainer (#3088) * split reducer logic for ExploreViewContainer * fix saveModal component and unit tests * revert changes in SaveModal_spec. will make another commit just to improve test coverage for SaveModal component. * remove comment-out code * fix merge confilicts
2017-08-10 20:04:44 -04:00
});
});