Skip to content

Conversation

@labkey-jeckels
Copy link
Contributor

Rationale

LinkedReportTest can be flaky, especially when run solo, because it clicks on Save before the form is ready to process it.

Changes

  • A yucky Thread.sleep() since we lack a way to ask the form if it's ready

Comment on lines 43 to 49
public void testLinkedReportToExternalURL() throws InterruptedException
{
goToProjectHome();
goToManageViews().clickAddReport("Link Report");
setFormElement(Locator.name("viewName"), REPORT_NAME);
setFormElement(Locator.name("linkUrl"), LINK_REPORT_URL);
Thread.sleep(1000); // Hack to prevent saving before the form is ready to submit, lacking a way to check before clicking
Copy link
Member

Choose a reason for hiding this comment

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

WebDriverWrapper has a sleep method that wraps the InterruptedException automatically.

Suggested change
public void testLinkedReportToExternalURL() throws InterruptedException
{
goToProjectHome();
goToManageViews().clickAddReport("Link Report");
setFormElement(Locator.name("viewName"), REPORT_NAME);
setFormElement(Locator.name("linkUrl"), LINK_REPORT_URL);
Thread.sleep(1000); // Hack to prevent saving before the form is ready to submit, lacking a way to check before clicking
public void testLinkedReportToExternalURL()
{
goToProjectHome();
goToManageViews().clickAddReport("Link Report");
setFormElement(Locator.name("viewName"), REPORT_NAME);
setFormElement(Locator.name("linkUrl"), LINK_REPORT_URL);
sleep(1000); // Hack to prevent saving before the form is ready to submit, lacking a way to check before clicking

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@labkey-jeckels labkey-jeckels merged commit abf9674 into develop Sep 2, 2025
6 of 7 checks passed
@labkey-jeckels labkey-jeckels deleted the fb_linkedReportTestStability branch September 2, 2025 22:34
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