Fix Test Issue in LKSM#1176
Merged
labkey-danield merged 16 commits intodevelopfrom Jul 27, 2022
Merged
Conversation
Added check to make sure parents are added or removed from a sample's lineage. Updaed a comment.
Member
labkey-tchad
left a comment
There was a problem hiding this comment.
Discussed moving change to BaseReactSelect. Ping for review once that's ready.
Comment on lines
+434
to
+436
| // Guard against react selector being in a 'Loading...' state. | ||
| WebDriverWrapper.waitFor(()->getParent(parentEntity).getComponentElement().isDisplayed(), | ||
| String.format("Selector for parents from '%s' is not visible.", parentEntity), 1_000); |
Member
There was a problem hiding this comment.
This shouldn't be necessary. BaseReactSelect.removeSelection already does this wait (plus more).
Suggested change
| // Guard against react selector being in a 'Loading...' state. | |
| WebDriverWrapper.waitFor(()->getParent(parentEntity).getComponentElement().isDisplayed(), | |
| String.format("Selector for parents from '%s' is not visible.", parentEntity), 1_000); |
Contributor
Author
There was a problem hiding this comment.
I've removed my changes to the ParentEntityEditPanel, and now only have a check in the BaseReactSelect to fail if it does not remove a selected element in the multi select control.
This should help debug random/intermittent failures in LKSM where lineage updates are not as expected.
…tSelect.removeSelection to validate that selection was removed. Commenting out previous change for the time being.
Make check for BaseReactSelect.removeSelection to not check staleness of element, only check selection list. Update check in FilteringReactSelect.typeAheadSelect that value was added. (Make sure other items were not removed). Implemented some linter suggestions in FilteringReactSelect.
labkey-tchad
approved these changes
Jul 22, 2022
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
There are some intermittent failure in the lineage tests in SampleManager. These failures happen because a parent sample/source was not removed when editing a child sample. I suspect that the issue is the ReactControl did not successfully remove the selected item from the control. This adds code in the ParentEntityEditPanel to check that an update to a parent, add or remove, happened. If the addition or removal is not successful an exception will be thrown. This will cause the test to fail at that time and not later on where it is more difficult to debug.
All of the Biologics, Labbook, Inventory and SampleManager tests have been run on TC using this change/branch.
Related Pull Requests
Changes