Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try to prevent stale reference to textarea #1615

Merged
merged 3 commits into from
Aug 30, 2023

Conversation

labkey-chrisj
Copy link
Contributor

Rationale

Recently, BiologicsAdminTest.testDeleteEmptyProject began failing on lims_starter with an error saying that the user-comment textArea was stale.

I've recently observed modal dialog-derived components failing in the same way and it seems that awaiting the component to be ready is helpful- it's possible that the component's lifecycle requires us to wait more rigorously, or to just use refindingElements within it.

Related Pull Requests

n/a

Changes

  • wait for the textArea to be present
  • use refindingWebElement for textArea

Copy link
Contributor

@labkey-danield labkey-danield left a comment

Choose a reason for hiding this comment

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

Cannot assume all delete dialogs will have a text area.
Examples of failures in LKSM with this change.

@@ -41,6 +41,7 @@ protected DeleteConfirmationDialog(ModalDialogFinder finder, SourcePage sourcePa
protected void waitForReady()
{
WebDriverWrapper.waitFor(()-> elementCache().body.isDisplayed() &&
Locator.tagWithClass("textarea", "form-control").existsIn(this) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

This assumes all delete dialogs will have a text are, that is not true.

@labkey-chrisj labkey-chrisj merged commit 4fc05a4 into develop Aug 30, 2023
@labkey-chrisj labkey-chrisj deleted the fb_deleteConfirmationStalenessFix branch August 30, 2023 21:17
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