diff --git a/src/org/labkey/test/params/FieldDefinition.java b/src/org/labkey/test/params/FieldDefinition.java index 0c484493f1..568e903161 100644 --- a/src/org/labkey/test/params/FieldDefinition.java +++ b/src/org/labkey/test/params/FieldDefinition.java @@ -123,8 +123,7 @@ else if (Character.isUpperCase(c) && Character.isLowerCase(chars[i - 1])) } } - // Multiple spaces in the UI are collapsed into a single space - return buf.toString().replaceAll("\\s+", " "); + return buf.toString(); } public String getEffectiveLabel() diff --git a/src/org/labkey/test/util/TestDataGenerator.java b/src/org/labkey/test/util/TestDataGenerator.java index f9d16ae2af..8e7ae57a2e 100644 --- a/src/org/labkey/test/util/TestDataGenerator.java +++ b/src/org/labkey/test/util/TestDataGenerator.java @@ -561,7 +561,7 @@ public static String randomDomainName(@Nullable String namePart, @Nullable Integ String charSet = ALPHANUMERIC_STRING + DOMAIN_SPECIAL_STRING; // TODO increase min to 5 and max to 50 String domainName = randomName(_namePart, getNumChars(numStartChars, 0), getNumChars(numEndChars, 10), charSet, null); - while (isDomainAndFieldNameInvalid(WebTestHelper.getRemoteApiConnection(false), _domainKind, domainName, null)) + while (isDomainAndFieldNameInvalid(_domainKind, domainName, null)) domainName = randomName(_namePart, getNumChars(numStartChars, 0), getNumChars(numEndChars, 10), charSet, null); // Multiple spaces in the UI are collapsed into a single space. If we need to test for handling of multiple spaces, we'll not use this generator @@ -602,14 +602,14 @@ public static String randomFieldName(@NotNull String part, @Nullable Integer num // TODO increase max to 50 String randomFieldName = randomName(part, getNumChars(numStartChars, 5), getNumChars(numEndChars, 5), chars, exclusion); - while (isDomainAndFieldNameInvalid(WebTestHelper.getRemoteApiConnection(false), _domainKind, null, randomFieldName)) + while (isDomainAndFieldNameInvalid(_domainKind, null, randomFieldName)) randomFieldName = randomName(part, getNumChars(numStartChars, 5), getNumChars(numEndChars, 5), chars, exclusion); TestLogger.log("Generated random field name for domainKind " + _domainKind + ": " + randomFieldName); return randomFieldName; } - private static boolean isDomainAndFieldNameInvalid(Connection connection, DomainUtils.DomainKind domainKind, @Nullable String domainName, @Nullable String fieldName) + private static boolean isDomainAndFieldNameInvalid(DomainUtils.DomainKind domainKind, @Nullable String domainName, @Nullable String fieldName) { SimplePostCommand command = new SimplePostCommand("property", "validateDomainAndFieldNames"); JSONObject domainDesign = new JSONObject(); @@ -630,7 +630,7 @@ private static boolean isDomainAndFieldNameInvalid(Connection connection, Domain try { - CommandResponse response = command.execute(connection, "/"); + CommandResponse response = command.execute(WebTestHelper.getRemoteApiConnection(), "/home"); return response.getParsedData().containsKey("errors"); } catch (CommandException | IOException e)