Skip to content

expose grid headers to tests#2508

Merged
labkey-chrisj merged 3 commits intodevelopfrom
fb_calculated_columns_test
Jun 24, 2025
Merged

expose grid headers to tests#2508
labkey-chrisj merged 3 commits intodevelopfrom
fb_calculated_columns_test

Conversation

@labkey-chrisj
Copy link
Contributor

@labkey-chrisj labkey-chrisj commented Jun 23, 2025

Rationale

This change exposes the recently-added getHeaders() method on ResponsiveGrid to tests, such that they can resolve fields for which the test might only have fieldKeys or names. This will be helpful for tests using randomly-generated/tricky field names, as some tricky chars that are legal for field names but aren't in field labels can mean the field I created (either via UI or API) won't match any in the grid if what the grid shows in its headers is labels.

Related Pull Requests

example usages are in https://github.com/LabKey/limsModules/pull/1481

Changes

Make ResponsiveGrid.getHeaders() public

@labkey-chrisj labkey-chrisj self-assigned this Jun 23, 2025
Copy link
Member

@labkey-tchad labkey-tchad left a comment

Choose a reason for hiding this comment

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

Consider adding getColumnNames and getColumnFieldKeys methods instead (similar to the existing getColumnLabels method). Tests are pretty much going to always map getHeaders into one of those. Might as well skip the step for them.

@labkey-chrisj labkey-chrisj merged commit a56522e into develop Jun 24, 2025
6 checks passed
@labkey-chrisj labkey-chrisj deleted the fb_calculated_columns_test branch June 24, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants