Skip to content
Merged
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
15 changes: 15 additions & 0 deletions src/org/labkey/test/components/ui/grids/GridBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,21 @@ public List<String> getMenuButtonsText()
return menuButtonText;
}

/**
* Get the text of the standalone action buttons on the grid bar, i.e. buttons that are not dropdown-menu
* toggles (for example a "Derive Samples" button that isn't collapsed into a "More" menu).
*
* @return the (non-empty) labels of the standalone buttons.
*/
public List<String> getButtonText()
{
return BootstrapLocators.button().withoutClass("dropdown-toggle").findElements(this)
.stream()
.map(button -> button.getText().trim())
.filter(text -> !text.isEmpty())
.toList();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You could use stream and filter for this, but I don't think that makes it any more readable.


public List<String> getMenuText(String buttonText)
{
MultiMenu multiMenu = null;
Expand Down