From c8f380c5c61ba06a4d7c7d285cb80a1ad0931272 Mon Sep 17 00:00:00 2001 From: labkey-danield Date: Fri, 24 Jan 2025 17:50:13 -0800 Subject: [PATCH] Use refind for elements on the NavBar, they may reload with a navigation. Add logging to the OverviewPage.getLineagePanelGrid. Add a check in SampleTypeDesignPage.beginAt to wait for any spinners to go away. In SMSampleNameIsRowIdTest.testSetLineageFromGrid check that update was successful before moving on. --- .../test/components/ui/navigation/NavBar.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/org/labkey/test/components/ui/navigation/NavBar.java b/src/org/labkey/test/components/ui/navigation/NavBar.java index 6284e5a5e3..fae4ffed11 100644 --- a/src/org/labkey/test/components/ui/navigation/NavBar.java +++ b/src/org/labkey/test/components/ui/navigation/NavBar.java @@ -16,8 +16,6 @@ import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; -import static org.labkey.test.WebDriverWrapper.WAIT_FOR_JAVASCRIPT; - public abstract class NavBar extends WebDriverComponent { private final WebDriver _driver; @@ -113,14 +111,14 @@ public WebDriver getDriver() protected abstract class ElementCache extends Component.ElementCache { - public WebElement headerLogo = Locator.tagWithClass("a", "header-logo__link").findWhenNeeded(this); - public WebElement headerLogoImage = Locator.tagWithClass("img", "header-logo__image").findWhenNeeded(this); - public WebElement userMenuButton = Locator.tagWithId("a", "user-menu-dropdown").findWhenNeeded(this).withTimeout(WAIT_FOR_JAVASCRIPT); - public WebElement userIcon = Locator.tagWithAttribute("img", "alt", "User Avatar").findWhenNeeded(this); - public WebElement projectNameDisplay = Locator.tagWithClass("span", "project-name").findWhenNeeded(this); - public Input searchBox = Input.Input(Locator.tagWithClass("input", "navbar__search-input"), getDriver()).findWhenNeeded(this); - public MultiMenu searchMenu = new MultiMenu.MultiMenuFinder(getDriver()).withButtonClass("navbar__find-and-search-button").findWhenNeeded(this); - public final ProductMenu productMenu = ProductMenu.finder(getDriver()).timeout(1000).findWhenNeeded(this); - public final ServerNotificationMenu notificationsMenu = ServerNotificationMenu.finder(getDriver()).timeout(1000).findWhenNeeded(this); + public WebElement headerLogo = Locator.tagWithClass("a", "header-logo__link").refindWhenNeeded(this); + public WebElement headerLogoImage = Locator.tagWithClass("img", "header-logo__image").refindWhenNeeded(this); + public WebElement userMenuButton = Locator.tagWithId("a", "user-menu-dropdown").refindWhenNeeded(this); + public WebElement userIcon = Locator.tagWithAttribute("img", "alt", "User Avatar").refindWhenNeeded(this); + public WebElement projectNameDisplay = Locator.tagWithClass("span", "project-name").refindWhenNeeded(this); + public Input searchBox = Input.Input(Locator.tagWithClass("input", "navbar__search-input"), getDriver()).refindWhenNeeded(this); + public MultiMenu searchMenu = new MultiMenu.MultiMenuFinder(getDriver()).withButtonClass("navbar__find-and-search-button").refindWhenNeeded(this); + public final ProductMenu productMenu = ProductMenu.finder(getDriver()).timeout(1000).refindWhenNeeded(this); + public final ServerNotificationMenu notificationsMenu = ServerNotificationMenu.finder(getDriver()).timeout(1000).refindWhenNeeded(this); } }