Skip to content

Commit e30bdda

Browse files
committed
Issue 53197: randomFieldName() to include WIDE_PLACEHOLDER
1 parent a45c1f4 commit e30bdda

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/org/labkey/test/tests/component/GridPanelTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ public class GridPanelTest extends GridPanelBaseTest
6464
// Column names.
6565
private static final String FILTER_NAME_COL = "Name";
6666
private static final String FILTER_EXPDATE_COL = "Expiration Date";
67-
private static final String FILTER_STRING_COL = "Str";
68-
private static final String FILTER_INT_COL = "Int";
69-
private static final String FILTER_EXTEND_CHAR_COL = "\u0106\u00D8\u0139";
70-
private static final String FILTER_BOOL_COL = "Bool";
71-
private static final String FILTER_DATE_COL = "Date";
67+
private static final String FILTER_STRING_COL = TestDataGenerator.randomFieldName("Str", 0, 5);
68+
private static final String FILTER_INT_COL = TestDataGenerator.randomFieldName("Int", 0, 5);
69+
private static final String FILTER_EXTEND_CHAR_COL = TestDataGenerator.randomFieldName("\u0106\u00D8\u0139", 0, 5);
70+
private static final String FILTER_BOOL_COL = TestDataGenerator.randomFieldName("Bool", 0, 5);
71+
private static final String FILTER_DATE_COL = TestDataGenerator.randomFieldName("Date", 0, 5);
7272
private static final String FILTER_STORED_AMOUNT_COL = "Amount";
7373

7474
// Views and columns used in the views. The views are only applied to the small sample type (Small_SampleType).

src/org/labkey/test/util/TestDataGenerator.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,12 +576,11 @@ public static String randomFieldName(String part, int numStartChars, int numEndC
576576
public static String randomFieldName(@NotNull String part, int numStartChars, int numEndChars, @Nullable String exclusion)
577577
{
578578
// use the characters that we know are encoded in fieldKeys plus characters that we know clients are using
579-
// Issue 53197: Field name with double byte character can cause client side exception in Firefox when trying to customize grid view.
580-
String chars = ALL_ILLEGAL_QUERY_KEY_CHARACTERS + " %()=+-[]_|*`'\":;<>?!@#^" + NON_LATIN_STRING;// + WIDE_PLACEHOLDER ;
579+
String chars = ALL_ILLEGAL_QUERY_KEY_CHARACTERS + " %()=+-[]_|*`'\":;<>?!@#^" + NON_LATIN_STRING + WIDE_PLACEHOLDER ;
581580

582581
String randomFieldName = randomName(part, numStartChars, numEndChars, chars, exclusion);
583582
TestLogger.log("Generated random field name: " + randomFieldName);
584-
return randomFieldName;
583+
return randomFieldName + WIDE_PLACEHOLDER; // TODO remove this hardcoded WIDE_PLACEHOLDER after a few TC runs
585584
}
586585

587586
public static String randomChoice(List<String> choices)

0 commit comments

Comments
 (0)