[Lyft-GA] Enable color consistency in a dashboard (#7135)

* Enable color consistency in a dashboard

Moved actions, minor UI, allowed dashboard copy

Fix linting errors

Undo unintentional change

Updated and added unit tests

Fail quietly if package has not been updated

Fail quietly on dashboard copy if package is old

* Update packages

* Remove unnecessary code

* Addressed Grace's comments

* Small fix for item key

* Reset chart's color during exploration

* Do not reset chart form data when exploring chart
This commit is contained in:
Kim Truong
2019-03-29 06:35:22 -07:00
committed by Christine Chambers
parent f66b598d37
commit e974a23f90
28 changed files with 586 additions and 170 deletions

View File

@@ -24,6 +24,7 @@ import FaveStar from '../../../../src/components/FaveStar';
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 = {
@@ -46,7 +47,8 @@ describe('Header', () => {
updateDashboardTitle: () => {},
editMode: false,
setEditMode: () => {},
showBuilderPane: false,
showBuilderPane: () => {},
builderPaneType: BUILDER_PANE_TYPE.NONE,
toggleBuilderPane: () => {},
updateCss: () => {},
hasUnsavedChanges: false,
@@ -150,9 +152,9 @@ describe('Header', () => {
expect(wrapper.find(HeaderActionsDropdown)).toHaveLength(1);
});
it('should render four Buttons', () => {
it('should render five Buttons', () => {
const wrapper = setup(overrideProps);
expect(wrapper.find(Button)).toHaveLength(4);
expect(wrapper.find(Button)).toHaveLength(5);
});
it('should set up undo/redo', () => {