wait for the select to have a selection before calling clearSelection #1787
+11
−13
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
BiologicsAutoPopulateAssayJobSamplesTest.testAssociateTaskToExistingAssayRun has been intermittently failing (23.11, starter) because the opens a detailTable for edit, calls
clearSelectValue
to empty the Workflow Task select, and expects to be able to click the 'Save Run Details' button.It happens that BaseReactSelect.clearSelection() does not check to ensure there is a selection (if there isn't, it No-ops). This means it is probably likely that the test called it before the select was populated and then failed to save changes because there were no changes and the save button never became enabled.
This change tells
DetailTableEdit.clearSelectValue()
to wait for the select to have any selection before callingclearSelection()
While doing this refactor, I discovered that DetailTableEdit has two clearSelectValue methods, this eliminates one and the related PR consolidates usages in biologics
Targeting develop for this fix, will consider backporting after
Related Pull Requests
https://github.com/LabKey/biologics/pull/2634
Changes
clearSelection