Skip to content

refactor testLongName to use FieldInfo#2737

Merged
labkey-chrisj merged 2 commits intorelease25.7-SNAPSHOTfrom
25.7_fb_use_fieldInfo_test
Oct 9, 2025
Merged

refactor testLongName to use FieldInfo#2737
labkey-chrisj merged 2 commits intorelease25.7-SNAPSHOTfrom
25.7_fb_use_fieldInfo_test

Conversation

@labkey-chrisj
Copy link
Contributor

Rationale

Recently, ListTest.testLongName failed because it couldn't find a UI field based on the namePart given to generate a random field. This change refactors the test to use a FieldInfo and refer to it for field information

Related Pull Requests

n/a

@labkey-chrisj labkey-chrisj self-assigned this Oct 8, 2025
Comment on lines 548 to 549
var input = Locator.tagContainingText("td", fieldWithDefault.getName()).followingSibling("td")
.descendant("input").findElement(page.getDriver());
Copy link
Member

Choose a reason for hiding this comment

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

I think this does want the label.

Suggested change
var input = Locator.tagContainingText("td", fieldWithDefault.getName()).followingSibling("td")
.descendant("input").findElement(page.getDriver());
var input = Locator.tagContainingText("td", fieldWithDefault.getLabel()).followingSibling("td")
.descendant("input").findElement(page.getDriver());

The failure here is because in 25.7 there is an off-by-one error in the random name generator that sometimes trims the first character from the name part. The failure screenshot shows the field "안(и@ith Default?"; note the missing "W".

Copy link
Contributor Author

@labkey-chrisj labkey-chrisj Oct 8, 2025

Choose a reason for hiding this comment

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

Thank you!
I'd spotted the discrepancy between label and namePart, didn't remember that this was resolved later.
I'm assuming the more-general fix would be painful to backport? If you think it's worth doing, I'm willing to do that as well

Co-authored-by: Trey Chadick <tchad@labkey.com>
@labkey-chrisj
Copy link
Contributor Author

@labkey-chrisj labkey-chrisj merged commit 4362609 into release25.7-SNAPSHOT Oct 9, 2025
7 of 8 checks passed
@labkey-chrisj labkey-chrisj deleted the 25.7_fb_use_fieldInfo_test branch October 9, 2025 16:13
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.

3 participants