Skip to content

Commit ecfdd90

Browse files
committed
Merge branch 'develop' into fb_filePathIssues
2 parents f5d5416 + bd10c83 commit ecfdd90

5 files changed

Lines changed: 19 additions & 13 deletions

File tree

data/api/rlabkey-api-experiment.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
<![CDATA[
286286
Rows via createAndLoad = 3
287287
Rows via insert = 2
288-
already exists
288+
duplicate key
289289
Rows via merge = 10
290290
Has audit transaction id = TRUE
291291
]]>

src/org/labkey/test/tests/FileAttachmentColumnTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ public class FileAttachmentColumnTest extends BaseWebDriverTest
9393
private final String RESULT_FILE_COL = "resultFile";
9494
private final String OTHER_RESULT_FILE_COL = "otherResultFile";
9595
private final String STUDY_DATASET_NAME = "ogreSpiteLevels";
96-
private static final FieldInfo LIST_ATTACHMENT_FIELD = new FieldInfo(TestDataGenerator.randomFieldName("File / Attachment"), ColumnType.Attachment);
96+
// Issue 53505: enable use of randomFieldName when issue is fixed
97+
//private static final FieldInfo LIST_ATTACHMENT_FIELD = new FieldInfo(TestDataGenerator.randomFieldName("File / Attachment"), ColumnType.Attachment);
98+
private static final FieldInfo LIST_ATTACHMENT_FIELD = new FieldInfo("File / Attachment", ColumnType.Attachment);
9799

98100
@Override
99101
protected void doCleanup(boolean afterTest) throws TestTimeoutException

src/org/labkey/test/tests/InlineImagesListTest.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.labkey.test.params.FieldDefinition.ColumnType;
3434
import org.labkey.test.util.DataRegionExportHelper;
3535
import org.labkey.test.util.DataRegionTable;
36+
import org.labkey.test.util.DomainUtils;
3637
import org.labkey.test.util.ExcelHelper;
3738
import org.labkey.test.util.TestDataGenerator;
3839
import org.openqa.selenium.By;
@@ -47,21 +48,24 @@
4748

4849
import static org.junit.Assert.assertEquals;
4950
import static org.junit.Assert.assertTrue;
51+
import static org.labkey.test.util.TestDataGenerator.ALL_CHARS_PLACEHOLDER;
52+
import static org.labkey.test.util.TestDataGenerator.REPEAT_PLACEHOLDER;
5053

5154
@Category(Daily.class)
5255
@BaseWebDriverTest.ClassTimeout(minutes = 5)
5356
public class InlineImagesListTest extends BaseWebDriverTest
5457
{
55-
protected final static String LIST_NAME = TestDataGenerator.randomDomainName("InlineImagesList");
56-
protected final static String LIST_KEY_NAME = TestDataGenerator.randomFieldName("Key");
58+
protected final static String LIST_NAME = TestDataGenerator.randomDomainName("InlineImagesList", DomainUtils.DomainKind.IntList);
59+
// list key name has a smaller max length than other field names, so we use a constant numEndChars and exclude the repeat and all chars placeholders
60+
protected final static String LIST_KEY_NAME = TestDataGenerator.randomFieldName("Key" + ALL_CHARS_PLACEHOLDER, 0, 5, "" + ALL_CHARS_PLACEHOLDER + REPEAT_PLACEHOLDER, DomainUtils.DomainKind.IntList);
5761
protected final static ColumnType LIST_KEY_TYPE = ColumnType.Integer;
5862

59-
protected final static String LIST_ATTACHMENT01_NAME = TestDataGenerator.randomFieldName("Attachment01");
60-
protected final static String LIST_ATTACHMENT01_LABEL = TestDataGenerator.randomFieldName("Attachment Column 01");
63+
protected final static String LIST_ATTACHMENT01_NAME = TestDataGenerator.randomFieldName("Attachment01", null, DomainUtils.DomainKind.IntList);
64+
protected final static String LIST_ATTACHMENT01_LABEL = "Attachment Column 01";
6165
protected final static String LIST_ATTACHMENT01_DESC = "An 1st attachment column.";
6266

63-
protected final static String LIST_ATTACHMENT02_NAME = TestDataGenerator.randomFieldName("Attachment02");
64-
protected final static String LIST_ATTACHMENT02_LABEL = TestDataGenerator.randomFieldName("Attachment Column 02");
67+
protected final static String LIST_ATTACHMENT02_NAME = TestDataGenerator.randomFieldName("Attachment02", null, DomainUtils.DomainKind.IntList);
68+
protected final static String LIST_ATTACHMENT02_LABEL = "Attachment Column 02";
6569
protected final static String LIST_ATTACHMENT02_DESC = "An 2nd attachment column.";
6670

6771
protected final static ColumnType LIST_ATTACHMENT_TYPE = ColumnType.Attachment;

src/org/labkey/test/tests/SampleTypeTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ public void testImportTypeOptions()
459459
String overlap = "Name1\tToBee\n";
460460
String newData = "Name2\tSee\n";
461461
setFormElement(Locator.name("text"), header + overlap + newData);
462-
clickButton("Submit", "already exists");
462+
clickButton("Submit", "duplicate key");
463463

464464
log("Switch to 'Insert and Replace'");
465465
importDataPage.setCopyPasteMerge(true);
@@ -484,7 +484,7 @@ public void testImportTypeOptions()
484484
importDataPage = drt.clickImportBulkData();
485485
importDataPage.setFile(sampleData);
486486
final String errorText = importDataPage.submitExpectingError();
487-
Assert.assertTrue("Wrong error when importing duplicate samples. " + errorText, errorText.contains("already exists"));
487+
Assert.assertTrue("Wrong error when importing duplicate samples. " + errorText, errorText.contains("duplicate key"));
488488
// TODO: Regression check for Issue 44202: Ugly error when data import fails due to duplicate key
489489
// Assert.assertTrue("Wrong error when importing duplicate samples. " + errorText, errorText.length() < 100);
490490

src/org/labkey/test/tests/TextChoiceSampleTypeTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void testTextChoiceInSampleTypeDesigner()
110110
expectedValues.add("A");
111111
expectedValues.add("\u00DC");
112112
expectedValues.add("|X|Y|Z|withPipeChars");
113-
expectedValues.add("A string with spaces and backslash at end.\\");
113+
expectedValues.add("A string with \"spaces\" and backslash at end.\\");
114114
expectedValues.add("B");
115115

116116
// Identify a couple of TextChoice values that will be used in samples.
@@ -173,8 +173,8 @@ public void testTextChoiceInSampleTypeDesigner()
173173

174174
samples.add(Map.of(textChoiceFieldName, valuesUsed.get(0), textField, ""));
175175
samples.add(Map.of(textChoiceFieldName, "", textField, expectedConvertedValues.get(0)));
176-
samples.add(Map.of(textChoiceFieldName, "\"" + valuesUsed.get(1)+ "\"", textField, ""));
177-
samples.add(Map.of(textChoiceFieldName, "\"" + valuesUsed.get(1) + "\"", textField, ""));
176+
samples.add(Map.of(textChoiceFieldName, valuesUsed.get(1), textField, ""));
177+
samples.add(Map.of(textChoiceFieldName, valuesUsed.get(1), textField, ""));
178178
samples.add(Map.of(textChoiceFieldName, "", textField, expectedConvertedValues.get(1)));
179179

180180
sampleTypeHelper.bulkImport(samples);

0 commit comments

Comments
 (0)