Wait out validation repaints in the EHR test - #763
Merged
labkey-martyp merged 2 commits intoSep 17, 2026
Merged
Conversation
Replaces waitForTextToDisappear with the shared wait in AbstractEHRTest, which tolerates the error panel's repaint buffer and re-validates once before failing.
The pre-submit wait polled the summary for 30 seconds with no way to clear it; the shared wait re-validates once first.
labkey-bpatel
approved these changes
Sep 16, 2026
labkey-martyp
added a commit
to LabKey/ehrModules
that referenced
this pull request
Sep 17, 2026
## Rationale Gives the EHR test suites one way to wait out a data entry form's validation, so they stop failing on error messages that are stale rather than real. The form's error summary repaints on a buffered event rather than when the validation response lands, so a message can still be on screen after the value that raised it was accepted, and a test that simply waits for the text to disappear times out on a form that is already valid. Pointing the wait at the form's own validation state instead, and re-running validation once before giving up, is what the form itself tells a user to do. ## Related Pull Requests - [LabKey/nircEHRModules#763](LabKey/nircEHRModules#763) - [LabKey/nbriEHRModules#48](LabKey/nbriEHRModules#48) - [LabKey/johnsHopkinsEHRModules#692](LabKey/johnsHopkinsEHRModules#692) ## Changes - Add a validation wait to the EHR test base class that requires the form to be quiet, tolerates the error panel's repaint window, and re-runs validation once before failing. - Report nothing in flight when the form's scripting is not on the page, so a caller that reaches the wait mid-navigation does not fail outright. - Report that a form offers no way to re-run validation rather than failing on the absent menu item, so the failure names the message that would not clear.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Stops the suite failing on form validation messages that are stale rather than real.
Several tests waited for an error to disappear from the form's error summary, which trails the form's actual state, so they timed out on values the form had already accepted. The shared wait added to the EHR test base class handles that, and re-runs validation once before giving up.
Related Pull Requests
Changes
Use the shared validation wait in place of waiting for the message text to disappear.
Route the wait before submitting a form through the same shared wait.