From 46f3072242212b7af3647f1ac2dc436354114daa Mon Sep 17 00:00:00 2001 From: ChrisJoosse Date: Mon, 23 Jun 2025 09:16:17 -0700 Subject: [PATCH 1/3] expose headers to tests --- src/org/labkey/test/components/ui/grids/ResponsiveGrid.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java b/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java index 191350816c..68a9dd4bbc 100644 --- a/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java +++ b/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java @@ -773,7 +773,7 @@ public Optional getGridEmptyMessage() return msg; } - List getHeaders() + public List getHeaders() { return Collections.unmodifiableList(elementCache().findHeaders()); } From c692e0ab95f5f5e4d10669046dc3321e4364ff06 Mon Sep 17 00:00:00 2001 From: ChrisJoosse Date: Mon, 23 Jun 2025 18:12:56 -0700 Subject: [PATCH 2/3] add getColumnNames, getColumnFieldKeys --- .../components/ui/grids/ResponsiveGrid.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java b/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java index 68a9dd4bbc..c1ab430624 100644 --- a/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java +++ b/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java @@ -642,6 +642,16 @@ public List getColumnLabels() return elementCache().getColumnLabels(); } + public List getColumnNames() + { + return elementCache().getColumnNames(); + } + + public List getColumnFieldKeys() + { + return elementCache().getColumnFieldKeys(); + } + /** * Get data from a row * @param rowIndex the index of the desired row @@ -861,6 +871,16 @@ protected List getColumnLabels() return findHeaders().stream().map(FieldReferenceManager.FieldReference::getLabel).collect(Collectors.toList()); } + protected List getColumnNames() + { + return findHeaders().stream().map(FieldReferenceManager.FieldReference::getName).collect(Collectors.toList()); + } + + protected List getColumnFieldKeys() + { + return findHeaders().stream().map(FieldReferenceManager.FieldReference::getFieldKey).collect(Collectors.toList()); + } + protected GridRow getRow(int index) { return getRows().get(index); From a914b582319e0b15bdb8f0bcaa9bd0dd073d0a02 Mon Sep 17 00:00:00 2001 From: ChrisJoosse Date: Tue, 24 Jun 2025 10:36:23 -0700 Subject: [PATCH 3/3] add in javadocs for new methods --- .../labkey/test/components/ui/grids/ResponsiveGrid.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java b/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java index c1ab430624..992e940d0d 100644 --- a/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java +++ b/src/org/labkey/test/components/ui/grids/ResponsiveGrid.java @@ -642,11 +642,19 @@ public List getColumnLabels() return elementCache().getColumnLabels(); } + /** + * + * @return a List<String> containing the names of the fields for each column header + */ public List getColumnNames() { return elementCache().getColumnNames(); } + /** + * + * @return a List<FieldKey> containing the fieldKeys for each column header + */ public List getColumnFieldKeys() { return elementCache().getColumnFieldKeys();