Skip to content

Share a validation wait for EHR form tests - #1207

Merged
labkey-martyp merged 5 commits into
release26.7-SNAPSHOTfrom
26.7_fb_shared_validation_wait
Sep 17, 2026
Merged

labkey-martyp merged 5 commits into
release26.7-SNAPSHOTfrom
26.7_fb_shared_validation_wait

Conversation

@labkey-martyp

@labkey-martyp labkey-martyp commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

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

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.

The wait tolerates DataEntryErrorPanel's repaint buffer and re-validates once before failing, and was previously private to one module's test.
Routes it through the validation wait so a stale summary re-validates instead of timing out.
Callers reach the probe mid-navigation, where referencing Ext4 threw and failed the test outright.
Forms that do not offer Re-Validate now report that instead of throwing, and the pre-submit wait keeps the 30 seconds it had before re-validating was an option.

@labkey-bpatel labkey-bpatel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Hopefully this resolves some intermittent flaky failures 🤞

The in-flight check reported zero whenever the form's scripting was not on the page, so the wait passed on a form that had not loaded, and it ignored the open grid editor that stops DataEntryErrorPanel repainting at all.

Re-Validate is now looked up after waiting the toolbar out, so a button that has not rendered yet no longer reads as a form without the feature.
@labkey-martyp
labkey-martyp merged commit 12da82e into release26.7-SNAPSHOT Sep 17, 2026
5 of 7 checks passed
@labkey-martyp
labkey-martyp deleted the 26.7_fb_shared_validation_wait branch September 17, 2026 10:25
labkey-martyp added a commit to LabKey/nircEHRModules that referenced this pull request Sep 17, 2026
## 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

-
[LabKey/ehrModules#1207](LabKey/ehrModules#1207)

## 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.
labkey-martyp added a commit to LabKey/nbriEHRModules that referenced this pull request Sep 17, 2026
## Rationale

Removes this module's private copy of the form validation wait now that
the same wait is available to every EHR suite from the test base class.

## Related Pull Requests

-
[LabKey/ehrModules#1207](LabKey/ehrModules#1207)

## Changes

- Drop the module's own copy of the validation wait in favour of the
shared one, leaving its call sites unchanged.

- Route the wait before submitting a form through the shared wait.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants