Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandraRamanenka committed Mar 4, 2024
1 parent 08b1057 commit b9b3432
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 34 deletions.
5 changes: 3 additions & 2 deletions src/WebformBuilder.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import assert from 'power-assert';
import Harness from '../test/harness';
import WebformBuilder from './WebformBuilder';
import Builders from './builders';
import { uniqueApiKeys, uniqueApiKeysLayout, uniqueApiKeysSameLevel, columnsForm, resourceKeyCamelCas, formWithNumericKeys } from '../test/formtest';
import { uniqueApiKeys, uniqueApiKeysLayout, uniqueApiKeysSameLevel, columnsForm, resourceKeyCamelCas } from '../test/formtest';
import formWithNumericKeys from '../test/forms/formWithNumericKeys';
import sameApiKeysLayoutComps from '../test/forms/sameApiKeysLayoutComps';
import testApiKeysUniquifying from '../test/forms/testApiKeysUniquifying';
import formBasedOnWizard from '../test/forms/formBasedOnWizard';
Expand Down Expand Up @@ -42,7 +43,7 @@ describe('WebformBuilder tests', function() {
}).catch(done);
});

it('Should show API error when componentshave invalid API keys', (done) => {
it('Should show API error when components have invalid API keys', (done) => {
const builder = Harness.getBuilder();
builder.webform.setForm(formWithNumericKeys).then(() => {
builder.highlightInvalidComponents();
Expand Down
30 changes: 30 additions & 0 deletions test/forms/formWithNumericKeys.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export default {
type: 'form',
display: 'form',
components: [
{
label: 'Text Field',
applyMaskOn: 'change',
tableView: true,
key: 'test',
type: 'textfield',
input: true,
},
{
label: 'Text Field',
applyMaskOn: 'change',
tableView: true,
key: '1234',
type: 'textfield',
input: true,
},
{
type: 'button',
label: 'Submit',
key: 'submit',
disableOnInvalid: true,
input: true,
tableView: false,
},
],
};
30 changes: 0 additions & 30 deletions test/formtest/formWithNumericKeys.json

This file was deleted.

2 changes: 0 additions & 2 deletions test/formtest/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const wizardWithTooltip = require('./wizardWithTooltip.json');
const resourceKeyCamelCase = require('./resourceKeyCamelCase.json');
const tooltipActivateCheckbox = require('./tooltipActivateCheckbox.json');
const formWithObjectValueSelect = require('./formWithObjectValueSelect.json');
const formWithNumericKeys = require('./formWithNumericKeys.json');

module.exports = {
advanced,
Expand Down Expand Up @@ -89,5 +88,4 @@ module.exports = {
resourceKeyCamelCase,
tooltipActivateCheckbox,
formWithObjectValueSelect,
formWithNumericKeys,
};

0 comments on commit b9b3432

Please sign in to comment.