Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/org/labkey/test/tests/SampleTypeParentColumnTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,6 @@ public void testAliasNameConflictsWithFieldName()
goToProjectHome();
projectMenu().navigateToFolder(PROJECT_NAME, SUB_FOLDER_NAME);

String path = PROJECT_NAME + "/" + SUB_FOLDER_NAME;

List<FieldDefinition> fields = new ArrayList<>();

fields.add(new FieldDefinition(ALIAS_NAME_CONFLICT, FieldDefinition.ColumnType.String));
Expand All @@ -726,7 +724,7 @@ public void testAliasNameConflictsWithFieldName()
String.join("\n", errors));
updatePage.removeParentAlias(0);

log("Now add a valid parent column and check that you cannot now add a field in the sample type with the same name.");
log("Now add a valid parent column and check that you cannot add a field in the sample type with the same name.");
updatePage.addParentAlias(GOOD_PARENT_NAME, SampleTypeDesigner.CURRENT_SAMPLE_TYPE);
updatePage.clickSave();

Expand All @@ -751,7 +749,17 @@ public void testAliasNameConflictsWithFieldName()

updatePage.clickCancel();

log("Validated name conflicts.");
// GH Issue 1257
clickFolder(SUB_FOLDER_NAME);
log("Check that you cannot add a field with an import alias that conflicts with the parent import alias");
updatePage = sampleHelper.goToEditSampleType(SAMPLE_TYPE_NAME);
updatePage.getFieldsPanel().addField("DupeAliasCheck")
.setImportAliases(GOOD_PARENT_NAME);
errors = updatePage.clickSaveExpectingErrors();
errorMsgExpectedTxt = "Field DupeAliasCheck has an import alias " + GOOD_PARENT_NAME+ " that conflicts with a parent alias header.";
assertThat("Error message", String.join("\n", errors), CoreMatchers.containsString(errorMsgExpectedTxt));

updatePage.clickCancel();
}

@Test
Expand Down