Refactor form editor settings values in tests
[MAILPOET-3005]
This commit is contained in:
committed by
Veljko V
parent
3789d18e33
commit
42f174e880
@@ -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');
|
||||
|
19
tests/javascript/form_editor/store/editor_settings.ts
Normal file
19
tests/javascript/form_editor/store/editor_settings.ts
Normal 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' },
|
||||
];
|
@@ -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, []);
|
||||
|
||||
|
Reference in New Issue
Block a user