Skip to content

Commit

Permalink
Merge branch 'develop' into fb_smTestUpdates
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-danield committed Dec 4, 2024
2 parents f1f7008 + e1c4b8e commit 4554829
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,21 +165,21 @@ public Optional<WebElement> optionalEditBtn()
public WebElement editBtn = editBtnLoc.findWhenNeeded(panelHeading);

public WebElement panelBody = Locator.tagWithClass("div", "panel-body").findWhenNeeded(this);
public WebElement parentsForElement = Locator.tagWithClass("div", "bottom-spacing").child("b")
public WebElement parentsForElement = Locator.tagWithClass("div", "bottom-padding").child("b")
.findWhenNeeded(panelBody);

// finds a webElement that will contain the detailTable and responsiveGrid for the specified source or parent type
public WebElement detailGroupContainer(String containingType)
{
return Locator.tagWithClass("div", "top-spacing")
return Locator.tagWithClass("div", "top-padding")
.withChild(Locator.tagWithClass("table", "detail-component--table__fixed")
.withDescendant(Locator.tag("td").withChild(Locator.linkWithText(containingType))))
.waitForElement(panelBody, 2000);
}
// finds the first link in each detail table in each detailGroupContainer; used to get a list of parent types
public List<WebElement> gridParentTypesLinks()
{
Locator detailGroupContainers = Locator.tagWithClass("div", "top-spacing")
Locator detailGroupContainers = Locator.tagWithClass("div", "top-padding")
.child(Locator.tagWithClass("table", "detail-component--table__fixed")
.descendant(Locator.tag("td").child(Locator.tag("a"))));
return detailGroupContainers.findElements(elementCache().panelBody);
Expand Down
4 changes: 3 additions & 1 deletion src/org/labkey/test/components/ui/pipeline/ImportsPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public String getPageHeader()

public QueryGrid getImportsGrid()
{
return elementCache().pipelineJobsGrid();
QueryGrid grid = elementCache().pipelineJobsGrid();
waitFor(grid::isLoaded, "Imports grid did not become active in time.", 2_500);
return grid;
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions src/org/labkey/test/util/URLBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public URLBuilder setQuery(Map<String, ?> query)
public URLBuilder setAppResourcePath(Object... pathParts)
{
List<String> encodedParts = Arrays.stream(pathParts).map(Objects::requireNonNull).map(String::valueOf)
.map(URIUtil::encodePath).collect(Collectors.toList());
.map(s -> EscapeUtil.encode(s).replace("+", " ")).collect(Collectors.toList());
setFragment("/" + String.join("/", encodedParts));
return this;
}
Expand Down Expand Up @@ -212,11 +212,11 @@ private void appendQueryString(StringBuilder url, Map<String, ?> params)
if (null != param.getKey())
{
url.append(firstParam ? "?" : "&");
url.append(param.getKey());
url.append(EscapeUtil.encode(param.getKey()));
if (null != param.getValue())
{
url.append("=");
url.append(param.getValue());
url.append(EscapeUtil.encode(String.valueOf(param.getValue())));
}
firstParam = false;
}
Expand Down

0 comments on commit 4554829

Please sign in to comment.