Skip to content

Fix Test Issue in LKSM#1176

Merged
labkey-danield merged 16 commits intodevelopfrom
fb_bootstrapMenuFix
Jul 27, 2022
Merged

Fix Test Issue in LKSM#1176
labkey-danield merged 16 commits intodevelopfrom
fb_bootstrapMenuFix

Conversation

@labkey-danield
Copy link
Copy Markdown
Contributor

@labkey-danield labkey-danield commented Jul 21, 2022

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

  • TBD

Changes

  • Added a waitFor check in the addParents method.
  • Added a waitFor check in the removeParent method.

Copy link
Copy Markdown
Member

@labkey-tchad labkey-tchad left a comment

Choose a reason for hiding this comment

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

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);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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-danield labkey-danield merged commit 431c58e into develop Jul 27, 2022
@labkey-danield labkey-danield deleted the fb_bootstrapMenuFix branch July 27, 2022 13:43
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