diff --git a/src/org/labkey/test/tests/SampleTypeParentColumnTest.java b/src/org/labkey/test/tests/SampleTypeParentColumnTest.java index 3cb68c6e6a..59a8994a0c 100644 --- a/src/org/labkey/test/tests/SampleTypeParentColumnTest.java +++ b/src/org/labkey/test/tests/SampleTypeParentColumnTest.java @@ -699,8 +699,6 @@ public void testAliasNameConflictsWithFieldName() goToProjectHome(); projectMenu().navigateToFolder(PROJECT_NAME, SUB_FOLDER_NAME); - String path = PROJECT_NAME + "/" + SUB_FOLDER_NAME; - List fields = new ArrayList<>(); fields.add(new FieldDefinition(ALIAS_NAME_CONFLICT, FieldDefinition.ColumnType.String)); @@ -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(); @@ -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