Skip to content

Commit

Permalink
Updates to fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
travist committed Nov 19, 2024
1 parent 2548255 commit 421f3ac
Show file tree
Hide file tree
Showing 4 changed files with 963 additions and 1,046 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"@formio/bootstrap": "3.0.0-dev.98.17ba6ea",
"@formio/choices.js": "^10.2.1",
"@formio/core": "2.1.0-dev.193.96f9aa9",
"@formio/text-mask-addons": "^3.8.0-formio.3",
"@formio/text-mask-addons": "3.8.0-formio.4",
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
"abortcontroller-polyfill": "^1.7.5",
"autocompleter": "^8.0.4",
Expand Down
15 changes: 7 additions & 8 deletions test/forms/helpers/testBasicComponentSettings/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,11 @@ export default {
multiple: {
'Should render component in multiple mode and able to add/remove value'(form, done) {
const testComponents = form.components.filter(comp => !['select', 'file'].includes(comp.component.type));

testComponents.forEach((comp, index) => {
const isLastComp = index === (testComponents.length - 1);
(function testNext() {
const comp = testComponents.shift();
if (!comp) {
return done();
}
const compKey = comp.component.key;
const compType = comp.component.type;

Expand Down Expand Up @@ -346,13 +348,10 @@ export default {

assert.deepEqual(removeRowBtnsAfterRemovingValue.length, 1, `${compKey} (component ${compType}): should remove 'remove value row btn' if row is removed in multiple mode `);
assert.deepEqual(componentInputsAfterRemovingValue.length, 1, `${compKey} (component ${compType}): should add remove row in multiple mode`);

if (isLastComp) {
done();
}
testNext();
}, 100);
}, 100);
});
})();
},
'Should set multiple values'(form, done) {
form.components.forEach((comp) => {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/TextField.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ describe('TextField Component', () => {
if (_.isEqual(value, lastValue)) {
done();
}
}, 300);
}, 500);
}).catch(done);
});
};
Expand Down
Loading

0 comments on commit 421f3ac

Please sign in to comment.