Skip to content

Conversation

@labkey-tchad
Copy link
Member

@labkey-tchad labkey-tchad commented Aug 6, 2025

Rationale

Browsers collapse adjacent spaces in rendered text. We need to account for this when checking for field labels appearing in rendered messages.

org.junit.ComparisonFailure: Cell warning msg not as expected at row 1 for col ~)(@#int Col Req!}  ' expected:<~)(@#int Col Req!} [ ]' is required.> but was:<~)(@#int Col Req!} []' is required.>
  at org.junit.Assert.assertEquals(Assert.java:117) ~[junit-4.13.2.jar:4.13.2]
  at org.labkey.test.util.DeferredErrorCollector.lambda$5(DeferredErrorCollector.java:247) [uiTest/:?]
  at org.labkey.test.util.DeferredErrorCollector.wrapAssertion(DeferredErrorCollector.java:187) [uiTest/:?]
  at org.labkey.test.util.DeferredErrorCollector.verifyEquals(DeferredErrorCollector.java:247) [uiTest/:?]
  at org.labkey.test.tests.component.EditableGridTest.testInputCellValidation(EditableGridTest.java:1348) [uiTest/:?]
rg.junit.ComparisonFailure: Error message for invalid primary key type not as expected expected:<...rom Lookup Field_;= [                                                ]?'*;👾,=($*,/;'> but was:<...rom Lookup Field_;= []?'*;👾,=($*,/;'>
  at org.junit.Assert.assertEquals(Assert.java:117) ~[junit-4.13.2.jar:4.13.2]
  at org.labkey.test.util.DeferredErrorCollector.lambda$5(DeferredErrorCollector.java:248) ~[uiTest/:?]
  at org.labkey.test.util.DeferredErrorCollector.wrapAssertion(DeferredErrorCollector.java:188) [uiTest/:?]
  at org.labkey.test.util.DeferredErrorCollector.verifyEquals(DeferredErrorCollector.java:248) [uiTest/:?]
  at org.labkey.test.tests.list.ListLookupTest.testWithLookupValidatorWithoutAlternateKeys(ListLookupTest.java:208) [uiTest/:?]

Related Pull Requests

  • N/A

Changes

  • Fix EditableGridTest and ListLookupTest to handle adjacent spaces in field names
  • Add FieldInfo.getUiLabel
  • Make FieldInfo._namePart final

@labkey-tchad labkey-tchad changed the title Handle double spaces in grid warning messages Handle double spaces in some error messages Aug 6, 2025
@labkey-tchad labkey-tchad merged commit 8a64dac into release25.7-SNAPSHOT Aug 7, 2025
6 of 7 checks passed
@labkey-tchad labkey-tchad deleted the 25.7_fb_uiLabel branch August 7, 2025 00:11
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