test: PropertiesModal (Dashboard) (#13931)

* Tests for PropertiesModal (Dashboard)

* fix: fetchMock
This commit is contained in:
Bruno Motta 2021-04-06 18:00:35 -03:00 committed by GitHub
parent 34991f5fab
commit ab0f5e3087
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 323 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -36,10 +36,10 @@ import FormLabel from 'src/components/FormLabel';
import { JsonEditor } from 'src/components/AsyncAceEditor';
import ColorSchemeControlWrapper from 'src/dashboard/components/ColorSchemeControlWrapper';
import { getClientErrorObject } from '../../utils/getClientErrorObject';
import withToasts from '../../messageToasts/enhancers/withToasts';
import '../stylesheets/buttons.less';
import { FeatureFlag, isFeatureEnabled } from '../../featureFlags';
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
import withToasts from 'src/messageToasts/enhancers/withToasts';
import 'src/dashboard/stylesheets/buttons.less';
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
const StyledJsonEditor = styled(JsonEditor)`
border-radius: ${({ theme }) => theme.borderRadius}px;
@ -143,7 +143,6 @@ class PropertiesModal extends React.PureComponent {
const jsonMetadataObj = jsonMetadata?.length
? JSON.parse(jsonMetadata)
: {};
if (!colorChoices.includes(value)) {
Modal.error({
title: 'Error',