Skip to content

Commit

Permalink
Address CR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga committed May 6, 2020
1 parent c56cb07 commit ab76582
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,6 @@ describe('Mappings editor: text datatype', () => {
},
};

let updatedMappings: any = {
...defaultMappings,
properties: {
myField: {
...defaultMappings.properties.myField,
...defaultTextParameters,
},
},
};

testBed = await setup({ value: defaultMappings, onChange: onChangeHandler });

const {
Expand Down Expand Up @@ -150,6 +140,15 @@ describe('Mappings editor: text datatype', () => {

({ data } = await getMappingsEditorData());

let updatedMappings: any = {
...defaultMappings,
properties: {
myField: {
...defaultMappings.properties.myField,
...defaultTextParameters,
},
},
};
expect(data).toEqual(updatedMappings);

// Re-open the edit panel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import { act } from 'react-dom/test-utils';

import { componentHelpers, MappingsEditorTestBed, nextTick, getRandomString } from './helpers';
import { componentHelpers, MappingsEditorTestBed, nextTick } from './helpers';

const { setup, getMappingsEditorDataFactory } = componentHelpers.mappingsEditor;
const onChangeHandler = jest.fn();
Expand Down Expand Up @@ -322,7 +322,7 @@ describe('Mappings editor: core', () => {
/**
* Mapped fields
*/
const newField = { name: getRandomString(), type: 'text' };
const newField = { name: 'someNewField', type: 'text' };
updatedMappings = {
...updatedMappings,
properties: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ describe('utils', () => {
someArray: [1, 2, 3],
someEmptyObject: {},
someDate: myDate,
falsey1: 0,
falsey2: '',
stripThis: undefined,
nested: {
value: 'bar',
Expand All @@ -92,6 +94,8 @@ describe('utils', () => {
someArray: [1, 2, 3],
someEmptyObject: {},
someDate: myDate,
falsey1: 0,
falsey2: '',
nested: {
value: 'bar',
deepNested: {
Expand Down

0 comments on commit ab76582

Please sign in to comment.