Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/org/labkey/test/components/html/SiteNavBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.labkey.test.pages.search.SearchResultsPage;
import org.labkey.test.pages.user.ShowUsersPage;
import org.labkey.test.util.AbstractUserHelper;
import org.labkey.test.util.LabKeyExpectedConditions;
import org.labkey.test.util.LogMethod;
import org.labkey.test.util.LoggedParam;
import org.openqa.selenium.NoSuchElementException;
Expand Down Expand Up @@ -184,6 +185,8 @@ public WebElement expandSearchBar()
elementCache().searchToggle.click();
WebDriverWrapper.waitFor(this::isSearchBarExpanded, "Search bar didn't expand", WebDriverWrapper.WAIT_FOR_JAVASCRIPT);
}
// 'active' starts a width transition; the input is clipped and not interactable until it finishes
getWrapper().shortWait().until(LabKeyExpectedConditions.animationIsDone(elementCache().globalSearch));
return elementCache().searchInput;
}

Expand Down Expand Up @@ -214,6 +217,8 @@ protected class Elements extends Component<?>.ElementCache
.findWhenNeeded(this).withTimeout(WebDriverWrapper.WAIT_FOR_JAVASCRIPT);
public final WebElement searchToggle = Locator.id("global-search-trigger")
.findWhenNeeded(this).withTimeout(WebDriverWrapper.WAIT_FOR_JAVASCRIPT);
public final WebElement globalSearch = Locator.id("global-search")
.findWhenNeeded(this).withTimeout(WebDriverWrapper.WAIT_FOR_JAVASCRIPT);
public final WebElement searchInput = Locator.input("q")
.findWhenNeeded(this).withTimeout(WebDriverWrapper.WAIT_FOR_JAVASCRIPT);
public final WebElement searchSubmitInput = Locator.tagWithClass("a", "btn-search")
Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/test/util/ext4cmp/Ext4CmpRef.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void waitForEnabled()
@LogMethod(quiet = true)
public static void waitForComponent(final WebDriverWrapper test, @LoggedParam final String query)
{
test.waitFor(() -> (Boolean)test.executeScript("return !!Ext4.ComponentQuery.query(\"" + query + "\").length;"),
test.waitFor(() -> (Boolean)test.executeScript("return !!window.Ext4 && !!Ext4.ComponentQuery.query(\"" + query + "\").length;"),
"Component did not appear: " + query, WebDriverWrapper.WAIT_FOR_JAVASCRIPT);
}

Expand Down
Loading