|
23 | 23 | import org.junit.BeforeClass; |
24 | 24 | import org.junit.Test; |
25 | 25 | import org.junit.experimental.categories.Category; |
| 26 | +import org.labkey.remoteapi.CommandException; |
26 | 27 | import org.labkey.remoteapi.domain.Domain; |
27 | 28 | import org.labkey.remoteapi.domain.DomainResponse; |
28 | 29 | import org.labkey.remoteapi.domain.PropertyDescriptor; |
|
50 | 51 | import org.labkey.test.pages.list.GridPage; |
51 | 52 | import org.labkey.test.params.FieldDefinition; |
52 | 53 | import org.labkey.test.params.FieldDefinition.StringLookup; |
| 54 | +import org.labkey.test.params.FieldInfo; |
| 55 | +import org.labkey.test.params.list.VarListDefinition; |
53 | 56 | import org.labkey.test.tests.AuditLogTest; |
54 | 57 | import org.labkey.test.util.AbstractDataRegionExportOrSignHelper.ColumnHeaderType; |
55 | 58 | import org.labkey.test.util.AuditLogHelper; |
@@ -2065,6 +2068,32 @@ public void customizeURLTest() |
2065 | 2068 | popLocation(); |
2066 | 2069 | } |
2067 | 2070 |
|
| 2071 | + /** |
| 2072 | + * Issue 53361: 'list-details.view' doesn't work when list pk is named "name" |
| 2073 | + * Expect bad product behavior. Convert this to a regression test once the issue is fixed. |
| 2074 | + */ |
| 2075 | + @Test |
| 2076 | + public void testPkNameParameterCollision() throws IOException, CommandException |
| 2077 | + { |
| 2078 | + String listName = TestDataGenerator.randomDomainName("list_key_check"); |
| 2079 | + String pkCol = "Name"; |
| 2080 | + |
| 2081 | + var dgen = new VarListDefinition(listName) |
| 2082 | + .setFields(List.of(new FieldDefinition(pkCol))) |
| 2083 | + .create(createDefaultConnection(), getProjectName()) |
| 2084 | + .withGeneratedRows(10); |
| 2085 | + List<String> pks = dgen.getRows().stream().map(row -> (String) row.get(pkCol)).toList(); |
| 2086 | + dgen.insertRows(); |
| 2087 | + |
| 2088 | + goToProjectHome(); |
| 2089 | + |
| 2090 | + goToManageLists().getGrid().viewListData(listName); |
| 2091 | + |
| 2092 | + clickAndWait(Locator.linkWithText(pks.get(0))); |
| 2093 | + assertElementPresent(Locator.byClass("labkey-error-heading") |
| 2094 | + .withText("List item '%s' does not exist".formatted(listName))); |
| 2095 | + } |
| 2096 | + |
2068 | 2097 | @Override |
2069 | 2098 | protected BrowserType bestBrowser() |
2070 | 2099 | { |
|
0 commit comments