Skip to content
Merged
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
27 changes: 27 additions & 0 deletions src/org/labkey/test/tests/list/ListTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.labkey.test.pages.ImportDataPage;
import org.labkey.test.pages.list.EditListDefinitionPage;
import org.labkey.test.pages.list.GridPage;
import org.labkey.test.pages.query.UpdateQueryRowPage;
import org.labkey.test.params.FieldDefinition;
import org.labkey.test.params.FieldDefinition.StringLookup;
import org.labkey.test.params.FieldInfo;
Expand Down Expand Up @@ -508,6 +509,32 @@ public void testNameTrimming()
checker().withScreenshot().verifyEquals("Name not trimmed as expected", trimmedName, editList.getName());
}

@Test // Issue 52339
public void testLongName()
{
String listName = "A_+-:''.¡™£¢∞§¶•ªº–≠œ∑´®†¥¨ˆøπ“‘«æ…¬˚∆˙©√ƒ∂ßΩ≈ç√∫µ≤≥÷‹›fifl‡°·‚—±⁄€‹›‡‰Æ«»¢∫√∑∏∂";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider append a random string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems superfluous when the name is already ridiculously complex.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps. It does lack certain pattern though, like whitespaces.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think any of these need to be escaped to unicode \u values. Was that your impression as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the list looks like it's as provided here. And, in any case, the particular characters are not all that important, just the fact that this leads to a really long URI encoded name.

String fieldWithDefault = TestDataGenerator.randomFieldName("With Default");
EditListDefinitionPage listEditPage = _listHelper.beginCreateList(getProjectName(), listName);
listEditPage.manuallyDefineFieldsWithAutoIncrementingKey("Key");
listEditPage.addField(new FieldDefinition(fieldWithDefault, ColumnType.String));
listEditPage.clickSave();

listEditPage = _listHelper.goToEditDesign(listName);
var page = listEditPage.getFieldsPanel()
.expand()
.getField(fieldWithDefault)
.clickAdvancedSettings()
.clickDefaultValuesLink();
var input = Locator.tagContainingText("td", "With Default").followingSibling("td").descendant("input").findElement(page.getDriver());
setFormElement(input, "42");
clickButton("Save Defaults");
_listHelper.beginAtList(getProjectName(), listName);

DataRegionTable list = new DataRegionTable("query", getDriver());
UpdateQueryRowPage updatePage = list.clickInsertNewRow();
checker().verifyEquals("Default value not as expected ", "42", updatePage.getTextInputValue(fieldWithDefault));
updatePage.submit();
}
/* Issue 51572: Bug with creating a new list by uploading a csv file in "UTF-8 with BOM" format
*/
@Test
Expand Down