Skip to content

Commit

Permalink
chore: use named exports in editor tests
Browse files Browse the repository at this point in the history
Related to #918
  • Loading branch information
Skaiir committed Jan 11, 2024
1 parent 6bc584a commit 715aa5a
Show file tree
Hide file tree
Showing 20 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion packages/form-js-editor/test/helper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { act } from 'preact/test-utils';

import TestContainer from 'mocha-test-container-support';

import FormEditor from '../../src/FormEditor';
import { FormEditor } from '../../src/FormEditor';

let OPTIONS, FORM_EDITOR;

Expand Down
2 changes: 1 addition & 1 deletion packages/form-js-editor/test/helper/mocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Injector } from 'didi';
import { isUndefined } from 'min-dash';

import EditorFormFields from '../../../src/render/EditorFormFields';
import { EditorFormFields } from '../../../src/render/EditorFormFields';

const EDITOR_CONFIG = {
propertiesPanel: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
inject
} from 'test/TestHelper';

import formEditorActionsModule from 'src/features/editor-actions';
import modelingModule from 'src/features/modeling';
import selectionModule from 'src/features/selection';
import { EditorActionsModule } from 'src/features/editor-actions';
import { ModelingModule } from 'src/features/modeling';
import { SelectionModule } from 'src/features/selection';

import schema from '../../form.json';

Expand All @@ -17,9 +17,9 @@ describe('features/editor-actions', function() {

beforeEach(bootstrapFormEditor(schema, {
modules: [
formEditorActionsModule,
modelingModule,
selectionModule
EditorActionsModule,
ModelingModule,
SelectionModule
]
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
inject
} from 'test/TestHelper';

import formEditorActionsModule from 'src/features/editor-actions';
import keyboardModule from 'src/features/keyboard';
import modelingModule from 'src/features/modeling';
import { EditorActionsModule } from 'src/features/editor-actions';
import { FormEditorKeyboardModule } from 'src/features/keyboard';
import { ModelingModule } from 'src/features/modeling';

import { createKeyEvent } from 'diagram-js/test/util/KeyEvents';

Expand All @@ -22,9 +22,9 @@ describe('features/editor-actions', function() {

beforeEach(bootstrapFormEditor(schema, {
modules: [
modelingModule,
formEditorActionsModule,
keyboardModule
ModelingModule,
EditorActionsModule,
FormEditorKeyboardModule
]
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
inject
} from '../../../TestHelper';

import modelingModule from 'src/features/modeling';
import { ModelingModule } from 'src/features/modeling';

import schema from '../../form.json';

Expand All @@ -12,7 +12,7 @@ describe('features/modeling - FormLayoutUpdater', function() {

beforeEach(bootstrapFormEditor(schema, {
additionalModules: [
modelingModule
ModelingModule
]
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
inject
} from '../../../TestHelper';

import modelingModule from 'src/features/modeling';
import { ModelingModule } from 'src/features/modeling';

import schema from '../../form.json';

Expand All @@ -17,7 +17,7 @@ describe('features/modeling', function() {

beforeEach(bootstrapFormEditor(schema, {
modules: [
modelingModule
ModelingModule
]
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import {
inject
} from '../../../../TestHelper';

import modelingModule from 'src/features/modeling';
import { ModelingModule } from 'src/features/modeling';

import schema from '../../../form-table.json';

describe('features/modeling - ColumnsSourceBehavior', function() {

beforeEach(bootstrapFormEditor(schema, {
additionalModules: [
modelingModule
ModelingModule
]
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
inject
} from '../../../../TestHelper';

import modelingModule from 'src/features/modeling';
import { ModelingModule } from 'src/features/modeling';

import schema from '../../../form.json';

Expand All @@ -12,7 +12,7 @@ describe('features/modeling - IdBehavior', function() {

beforeEach(bootstrapFormEditor(schema, {
modules: [
modelingModule
ModelingModule
]
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
inject
} from '../../../../TestHelper';

import modelingModule from 'src/features/modeling';
import { ModelingModule } from 'src/features/modeling';

import schema from '../../../form.json';

Expand All @@ -12,7 +12,7 @@ describe('features/modeling - KeyBehavior', function() {

beforeEach(bootstrapFormEditor(schema, {
additionalModules: [
modelingModule
ModelingModule
]
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import {
inject
} from '../../../../TestHelper';

import modelingModule from 'src/features/modeling';
import { ModelingModule } from 'src/features/modeling';

import schema from '../../../defaultValues.json';

describe('features/modeling - OptionsSourceBehavior', function() {

beforeEach(bootstrapFormEditor(schema, {
additionalModules: [
modelingModule
ModelingModule
]
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
inject
} from '../../../../TestHelper';

import modelingModule from 'src/features/modeling';
import { ModelingModule } from 'src/features/modeling';

import schema from '../../../form.json';

Expand All @@ -12,7 +12,7 @@ describe('features/modeling - PathBehavior', function() {

beforeEach(bootstrapFormEditor(schema, {
additionalModules: [
modelingModule
ModelingModule
]
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
inject
} from '../../../../TestHelper';

import modelingModule from 'src/features/modeling';
import { ModelingModule } from 'src/features/modeling';

import schema from '../../../form.json';

Expand All @@ -12,7 +12,7 @@ describe('features/modeling - ValidateBehavior', function() {

beforeEach(bootstrapFormEditor(schema, {
additionalModules: [
modelingModule
ModelingModule
]
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { render, fireEvent } from '@testing-library/preact/pure';

import { FormFields } from '@bpmn-io/form-js-viewer';

import Palette, {
import {
Palette,
collectPaletteEntries,
PALETTE_GROUPS
} from '../../../../src/features/palette/components/Palette';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
createFormEditor
} from '../../../../src';

import paletteModule from '../../../../src/features/palette';
import { PaletteModule } from '../../../../src/features/palette';

import schema from '../../form.json';

Expand Down Expand Up @@ -47,7 +47,7 @@ describe('features/palette', function() {
async function createEditor(schema, options = {}) {
const {
additionalModules = [
paletteModule
PaletteModule
]
} = options;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ import {

import { query as domQuery } from 'min-dom';

import PropertiesPanel from '../../../../src/features/properties-panel/PropertiesPanel';
import { OPTIONS_SOURCES, OPTIONS_SOURCES_DEFAULTS } from '@bpmn-io/form-js-viewer';
import { removeKey } from '../../../../src/features/properties-panel/groups/CustomPropertiesGroup';

import PropertiesProvider from '../../../../src/features/properties-panel/PropertiesProvider';

import { PropertiesProvider } from '../../../../src/features/properties-panel/PropertiesProvider';
import { PropertiesPanel } from '../../../../src/features/properties-panel/PropertiesPanel';
import { FormFields } from '@bpmn-io/form-js-viewer';

import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
createFormEditor
} from '../../../../src';

import propertiesPanelModule from '../../../../src/features/properties-panel';
import { PropertiesPanelModule } from '../../../../src/features/properties-panel';

import schema from '../../form.json';

Expand Down Expand Up @@ -47,7 +47,7 @@ describe('features/propertiesPanel', function() {
async function createEditor(schema, options = {}) {
const {
additionalModules = [
propertiesPanelModule,
PropertiesPanelModule,
...options.additionalModules || []
]
} = options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
createFormEditor
} from '../../../../src';

import renderInjectionModule from '../../../../src/features/render-injection';
import { RenderInjectionModule } from '../../../../src/features/render-injection';

import schema from '../../form.json';

Expand Down Expand Up @@ -42,7 +42,7 @@ describe('features/render-injection', function() {
async function createEditor(schema, options = {}) {
const {
additionalModules = [
renderInjectionModule,
RenderInjectionModule,
ExtensionModule
]
} = options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
inject
} from '../../../TestHelper';

import selectionModule from 'src/features/selection';
import { SelectionModule } from 'src/features/selection';

const { spy } = sinon;

Expand All @@ -29,7 +29,7 @@ describe('features/selection', function() {

beforeEach(bootstrapFormEditor(schema, {
modules: [
selectionModule
SelectionModule
]
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
inject
} from '../../../TestHelper';

import selectionModule from 'src/features/selection';
import modelingModule from 'src/features/modeling';
import { SelectionModule } from 'src/features/selection';
import { ModelingModule } from 'src/features/modeling';


describe('features/selection', function() {
Expand All @@ -28,8 +28,8 @@ describe('features/selection', function() {

beforeEach(bootstrapFormEditor(schema, {
modules: [
modelingModule,
selectionModule
ModelingModule,
SelectionModule
]
}));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render } from '@testing-library/preact/pure';

import EditorText from '../../../../../src/render/components/editor-form-fields/EditorText';
import { EditorText } from '../../../../../src/render/components/editor-form-fields/EditorText';

import { expectNoViolations, createFormContainer } from '../../../../TestHelper';

Expand Down

0 comments on commit 715aa5a

Please sign in to comment.