Refactor form editor settings values in tests

[MAILPOET-3005]
This commit is contained in:
Rostislav Wolny
2020-07-02 13:10:47 +02:00
committed by Veljko V
parent 3789d18e33
commit 42f174e880
3 changed files with 27 additions and 28 deletions

View File

@@ -19,20 +19,10 @@ import {
imageBlock,
} from './block_to_form_test_data.js';
const colorDefinitions = [{
name: 'Black',
slug: 'black',
color: '#000000',
}, {
name: 'White',
slug: 'white',
color: '#ffffff',
}];
const fontSizeDefinitions = [
{ name: 'Small', size: 13, slug: 'small' },
{ name: 'Normal', size: 16, slug: 'normal' },
];
import {
fontSizeDefinitions,
colorDefinitions,
} from './editor_settings';
const checkBodyInputBasics = (input) => {
expect(input.id).to.be.a('string');

View File

@@ -0,0 +1,19 @@
import {
ColorDefinition,
FontSizeDefinition,
} from '../../../../assets/js/src/form_editor/store/form_data_types';
export const colorDefinitions: ColorDefinition[] = [{
name: 'Black',
slug: 'black',
color: '#000000',
}, {
name: 'White',
slug: 'white',
color: '#ffffff',
}];
export const fontSizeDefinitions: FontSizeDefinition[] = [
{ name: 'Small', size: 13, slug: 'small' },
{ name: 'Normal', size: 16, slug: 'normal' },
];

View File

@@ -21,20 +21,10 @@ import {
image,
} from './form_to_block_test_data.js';
const colorDefinitions = [{
name: 'Black',
slug: 'black',
color: '#000000',
}, {
name: 'White',
slug: 'white',
color: '#ffffff',
}];
const fontSizeDefinitions = [
{ name: 'Small', size: 13, slug: 'small' },
{ name: 'Normal', size: 16, slug: 'normal' },
];
import {
fontSizeDefinitions,
colorDefinitions,
} from './editor_settings';
const formBodyToBlocks = formBodyToBlocksFactory(colorDefinitions, fontSizeDefinitions, []);