From a03fc0c48e66f3a8918211f3d5793d1852d47d31 Mon Sep 17 00:00:00 2001 From: Travis Tidwell Date: Wed, 3 Apr 2024 09:59:16 -0500 Subject: [PATCH] Fixing tests. --- src/Webform.js | 5 +---- src/components/editgrid/EditGrid.js | 1 + src/components/select/Select.unit.js | 12 ++++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/Webform.js b/src/Webform.js index 4c8363c419..a94917dcb3 100644 --- a/src/Webform.js +++ b/src/Webform.js @@ -1139,10 +1139,7 @@ export default class Webform extends NestedDataComponent { * @returns {*} */ /* eslint-disable no-unused-vars */ - showErrors(errors, triggerEvent, onChange) { - if (!errors) { - return; - } + showErrors(errors, triggerEvent) { this.loading = false; if (!Array.isArray(errors)) { errors = [errors]; diff --git a/src/components/editgrid/EditGrid.js b/src/components/editgrid/EditGrid.js index 3f934dc491..d62aa44a94 100644 --- a/src/components/editgrid/EditGrid.js +++ b/src/components/editgrid/EditGrid.js @@ -1221,6 +1221,7 @@ export default class EditGridComponent extends NestedArrayComponent { } else { this.alert.clear(); + this.alert = null; } } } diff --git a/src/components/select/Select.unit.js b/src/components/select/Select.unit.js index cd3c8b16cb..b7cb7e9fd7 100644 --- a/src/components/select/Select.unit.js +++ b/src/components/select/Select.unit.js @@ -718,8 +718,8 @@ describe('Select Component', () => { assert.equal(searchHasBeenDebounced, true); done(); - }, 50); - }, 200); + }, 500); + }, 300); }).catch(done); }); @@ -988,14 +988,14 @@ describe('Select Component', () => { select.pristine = false; setTimeout(() => { - assert(!select.errors.length, 'Select should be valid while changing'); + assert(!select.visibleErrors.length, 'Select should be valid while changing'); select.focusableElement.dispatchEvent(new Event('blur')); setTimeout(() => { - assert(select.errors.length, 'Should set error after Select component was blurred'); + assert(select.visibleErrors.length, 'Should set error after Select component was blurred'); done(); - }, 500); - }, 200); + }, 300); + }, 300); }).catch(done); });