mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
style: use tabs in dashboard edit pane (#10394)
* style: use tabs in dashboard edit pane * fix tests * more hackin' * getting ready to rip cell measurer * working * pogress * Fix cards * done * fix jest * fix cy
This commit is contained in:
committed by
GitHub
parent
51a88cb19b
commit
ece91928a9
@@ -32,7 +32,6 @@ import DashboardComponent from 'src/dashboard/containers/DashboardComponent';
|
||||
import DashboardHeader from 'src/dashboard/containers/DashboardHeader';
|
||||
import DashboardGrid from 'src/dashboard/containers/DashboardGrid';
|
||||
import * as dashboardStateActions from 'src/dashboard/actions/dashboardState';
|
||||
import { BUILDER_PANE_TYPE } from 'src/dashboard/util/constants';
|
||||
|
||||
import WithDragDropContext from '../helpers/WithDragDropContext';
|
||||
import {
|
||||
@@ -64,7 +63,6 @@ describe('DashboardBuilder', () => {
|
||||
deleteTopLevelTabs() {},
|
||||
editMode: false,
|
||||
showBuilderPane() {},
|
||||
builderPaneType: BUILDER_PANE_TYPE.NONE,
|
||||
setColorSchemeAndUnsavedChanges() {},
|
||||
colorScheme: undefined,
|
||||
handleComponentDrop() {},
|
||||
@@ -155,7 +153,6 @@ describe('DashboardBuilder', () => {
|
||||
wrapper.setProps({
|
||||
...props,
|
||||
editMode: true,
|
||||
builderPaneType: BUILDER_PANE_TYPE.ADD_COMPONENTS,
|
||||
});
|
||||
expect(wrapper.find(BuilderComponentPane)).toExist();
|
||||
});
|
||||
@@ -167,7 +164,6 @@ describe('DashboardBuilder', () => {
|
||||
wrapper.setProps({
|
||||
...props,
|
||||
editMode: true,
|
||||
builderPaneType: BUILDER_PANE_TYPE.COLORS,
|
||||
});
|
||||
expect(wrapper.find(BuilderComponentPane)).toExist();
|
||||
});
|
||||
|
||||
@@ -68,7 +68,7 @@ describe('HeaderActionsDropdown', () => {
|
||||
|
||||
it('should render two MenuItems', () => {
|
||||
const wrapper = setup(overrideProps);
|
||||
expect(wrapper.find(MenuItem)).toHaveLength(2);
|
||||
expect(wrapper.find(MenuItem)).toHaveLength(3);
|
||||
});
|
||||
|
||||
it('should render the RefreshIntervalModal', () => {
|
||||
|
||||
@@ -25,7 +25,6 @@ import PublishedStatus from 'src/dashboard/components/PublishedStatus';
|
||||
import HeaderActionsDropdown from 'src/dashboard/components/HeaderActionsDropdown';
|
||||
import Button from 'src/components/Button';
|
||||
import UndoRedoKeylisteners from 'src/dashboard/components/UndoRedoKeylisteners';
|
||||
import { BUILDER_PANE_TYPE } from 'src/dashboard/util/constants';
|
||||
|
||||
describe('Header', () => {
|
||||
const props = {
|
||||
@@ -59,7 +58,6 @@ describe('Header', () => {
|
||||
editMode: false,
|
||||
setEditMode: () => {},
|
||||
showBuilderPane: () => {},
|
||||
builderPaneType: BUILDER_PANE_TYPE.NONE,
|
||||
updateCss: () => {},
|
||||
hasUnsavedChanges: false,
|
||||
maxUndoHistoryExceeded: false,
|
||||
@@ -111,11 +109,6 @@ describe('Header', () => {
|
||||
expect(wrapper.find(HeaderActionsDropdown)).toExist();
|
||||
});
|
||||
|
||||
it('should render one Button', () => {
|
||||
const wrapper = setup(overrideProps);
|
||||
expect(wrapper.find(Button)).toExist();
|
||||
});
|
||||
|
||||
it('should not set up undo/redo', () => {
|
||||
const wrapper = setup(overrideProps);
|
||||
expect(wrapper.find(UndoRedoKeylisteners)).not.toExist();
|
||||
@@ -154,11 +147,6 @@ describe('Header', () => {
|
||||
expect(wrapper.find(HeaderActionsDropdown)).toExist();
|
||||
});
|
||||
|
||||
it('should render one Button', () => {
|
||||
const wrapper = setup(overrideProps);
|
||||
expect(wrapper.find(Button)).toExist();
|
||||
});
|
||||
|
||||
it('should not set up undo/redo', () => {
|
||||
const wrapper = setup(overrideProps);
|
||||
expect(wrapper.find(UndoRedoKeylisteners)).not.toExist();
|
||||
@@ -199,7 +187,7 @@ describe('Header', () => {
|
||||
|
||||
it('should render five Buttons', () => {
|
||||
const wrapper = setup(overrideProps);
|
||||
expect(wrapper.find(Button)).toHaveLength(5);
|
||||
expect(wrapper.find(Button)).toHaveLength(4);
|
||||
});
|
||||
|
||||
it('should set up undo/redo', () => {
|
||||
@@ -239,11 +227,6 @@ describe('Header', () => {
|
||||
expect(wrapper.find(HeaderActionsDropdown)).toExist();
|
||||
});
|
||||
|
||||
it('should render one Button', () => {
|
||||
const wrapper = setup(overrideProps);
|
||||
expect(wrapper.find(Button)).toExist();
|
||||
});
|
||||
|
||||
it('should not set up undo/redo', () => {
|
||||
const wrapper = setup(overrideProps);
|
||||
expect(wrapper.find(UndoRedoKeylisteners)).not.toExist();
|
||||
|
||||
@@ -16,14 +16,12 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { BUILDER_PANE_TYPE } from 'src/dashboard/util/constants';
|
||||
import { sliceId } from './mockChartQueries';
|
||||
|
||||
export default {
|
||||
sliceIds: [sliceId],
|
||||
expandedSlices: {},
|
||||
editMode: false,
|
||||
builderPaneType: BUILDER_PANE_TYPE.NONE,
|
||||
hasUnsavedChanges: false,
|
||||
maxUndoHistoryExceeded: false,
|
||||
isStarred: true,
|
||||
|
||||
@@ -30,7 +30,6 @@ import {
|
||||
} from 'src/dashboard/actions/dashboardState';
|
||||
|
||||
import dashboardStateReducer from 'src/dashboard/reducers/dashboardState';
|
||||
import { BUILDER_PANE_TYPE } from 'src/dashboard/util/constants';
|
||||
|
||||
describe('dashboardState reducer', () => {
|
||||
it('should return initial state', () => {
|
||||
@@ -72,7 +71,6 @@ describe('dashboardState reducer', () => {
|
||||
),
|
||||
).toEqual({
|
||||
editMode: true,
|
||||
builderPaneType: BUILDER_PANE_TYPE.ADD_COMPONENTS,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -128,7 +126,6 @@ describe('dashboardState reducer', () => {
|
||||
hasUnsavedChanges: false,
|
||||
maxUndoHistoryExceeded: false,
|
||||
editMode: false,
|
||||
builderPaneType: BUILDER_PANE_TYPE.NONE,
|
||||
updatedColorScheme: false,
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user