Skip to content
Merged
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
9 changes: 8 additions & 1 deletion src/org/labkey/test/components/ui/edit/EditInlineField.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public String getLabel()

public String getValue()
{
return elementCache().toggle().getText();
if (elementCache().hasToggle())
return elementCache().toggle().getText();
return getComponentElement().getText();
}

private boolean isOpen()
Expand Down Expand Up @@ -125,6 +127,11 @@ WebElement toggle()
return toggleLoc.waitForElement(this, 1_000);
}

boolean hasToggle()
{
return toggleLoc.existsIn(this);
}

WebElement pencil()
{
return pencilLoc.waitForElement(this, 1_000);
Expand Down
13 changes: 13 additions & 0 deletions src/org/labkey/test/components/ui/grids/DetailTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,19 @@ else if (elementCache().dataFieldByKey(identifier).isDisplayed())
}
}

public boolean hasField(String identifier)
{
try
{
getField(identifier);
return true;
}
catch (NoSuchElementException nse)
{
return false;
}
}

public boolean fieldHasFormatPill(String identifier)
{
return Locator.tagWithClass("*", "status-pill").existsIn(getField(identifier));
Expand Down