From 95c21d4fb2d739ff945273606da7fbdd20b2b040 Mon Sep 17 00:00:00 2001 From: XingY Date: Tue, 23 Dec 2025 14:09:15 -0800 Subject: [PATCH 1/3] 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/3] 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(); From 0b8f8917ff2259e67a7b35ec8c197b3e5edd68bf Mon Sep 17 00:00:00 2001 From: XingY Date: Fri, 26 Dec 2025 12:12:08 -0800 Subject: [PATCH 3/3] add test for importing assay with sample filters --- .../labkey/test/components/ui/search/FilterExpressionPanel.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/labkey/test/components/ui/search/FilterExpressionPanel.java b/src/org/labkey/test/components/ui/search/FilterExpressionPanel.java index 1ab0794b14..6020bae857 100644 --- a/src/org/labkey/test/components/ui/search/FilterExpressionPanel.java +++ b/src/org/labkey/test/components/ui/search/FilterExpressionPanel.java @@ -116,6 +116,8 @@ else if (value2 != null) } else { + if (value1 instanceof List list1) + value1 = String.join(";", list1.stream().map(Object::toString).toList()); elementCache().textValuesFirst.get(index).set(value1.toString()); if (value2 != null) {