From 95c21d4fb2d739ff945273606da7fbdd20b2b040 Mon Sep 17 00:00:00 2001 From: XingY Date: Tue, 23 Dec 2025 14:09:15 -0800 Subject: [PATCH 1/2] Test component for selecting task sample All checkbox --- .../test/components/ui/grids/GridFilterModal.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/org/labkey/test/components/ui/grids/GridFilterModal.java b/src/org/labkey/test/components/ui/grids/GridFilterModal.java index f8b6c529bb..b597356abf 100644 --- a/src/org/labkey/test/components/ui/grids/GridFilterModal.java +++ b/src/org/labkey/test/components/ui/grids/GridFilterModal.java @@ -53,6 +53,18 @@ public GridFilterModal selectField(CharSequence fieldIdentifier) return this; } + /** + * Sets the 'All [sample type] samples` (used by workflow task filter) + * @param checked whether or not to check the box + * @return this component + */ + public GridFilterModal checkAllDataCheckbox(boolean checked) + { + Checkbox noDataBox = Checkbox.Checkbox(Locator.input("field-value-allvalues-check")) + .waitFor(elementCache().fieldsSelectionPanel); + noDataBox.set(checked); + return this; + } /** * Sets the 'Find Samples without [selected assay] results * @param checked whether or not to check the box From 5d66e8c03296afeed8c54273e0b92686fb078a1f Mon Sep 17 00:00:00 2001 From: XingY Date: Thu, 25 Dec 2025 20:27:28 -0800 Subject: [PATCH 2/2] add tests --- .../test/components/ui/FilterStatusValue.java | 9 ++++++++ .../components/ui/grids/TabbedGridPanel.java | 22 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/org/labkey/test/components/ui/FilterStatusValue.java b/src/org/labkey/test/components/ui/FilterStatusValue.java index 34422a9060..79264d890e 100644 --- a/src/org/labkey/test/components/ui/FilterStatusValue.java +++ b/src/org/labkey/test/components/ui/FilterStatusValue.java @@ -64,6 +64,15 @@ public void remove() , "The value item ["+originalText+"] did not disappear.", 1000); } + public void open() + { + getWrapper().mouseOver(getComponentElement()); + getWrapper().mouseOver(elementCache().textSpan); + WebDriverWrapper.waitFor(()-> isActive() && isClose(), + "The filter status item with text ["+getText()+"] did not become active.", 500); + elementCache().textSpan.click(); + } + /** * A filter will be locked if it was applied by a view. * diff --git a/src/org/labkey/test/components/ui/grids/TabbedGridPanel.java b/src/org/labkey/test/components/ui/grids/TabbedGridPanel.java index a3132e9d45..6826666a62 100644 --- a/src/org/labkey/test/components/ui/grids/TabbedGridPanel.java +++ b/src/org/labkey/test/components/ui/grids/TabbedGridPanel.java @@ -91,6 +91,28 @@ public boolean isSelected(String tabText) return tabClass != null && tabClass.toLowerCase().contains("active"); } + public String getSelectedTab(boolean includeCounts) + { + List tabs = getTabs(); + String tabWithCount = null; + for (int i = 0; i < tabs.size(); i++) + { + String tabText = tabs.get(i); + if (isSelected(tabText)) + { + tabWithCount = tabText; + break; + } + } + if (tabWithCount == null) + return null; + + if (includeCounts) + return tabWithCount; + + return tabWithCount.substring(0, tabWithCount.lastIndexOf(" (")); + } + public QueryGrid selectGrid(String tabText) { QueryGrid grid = getSelectedGrid();