Skip to content

Commit c18113c

Browse files
committed
Test updates
1 parent 390b471 commit c18113c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

api/src/org/labkey/api/data/AbstractFileDisplayColumn.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public void renderInputHtml(RenderContext ctx, HtmlWriter out, Object value)
286286
if (null != filename)
287287
{
288288
// Existing value, so tell the user the file name, allow the file to be removed, and a new file uploaded
289-
renderThumbnailAndRemoveLink(out, ctx, formFieldName, filename, value, input);
289+
renderThumbnailAndRemoveLink(out, ctx, getBoundColumn(), filename, value, input);
290290
}
291291
else
292292
{
@@ -307,14 +307,14 @@ protected String getRemovalWarningText(String filename)
307307
return "Previous file " + filename + " will be removed.";
308308
}
309309

310-
private void renderThumbnailAndRemoveLink(HtmlWriter out, RenderContext ctx, String fieldName, String filename, Object value, InputBuilder<?> filePicker)
310+
private void renderThumbnailAndRemoveLink(HtmlWriter out, RenderContext ctx, ColumnInfo column, String filename, Object value, InputBuilder<?> filePicker)
311311
{
312312
String divId = GUID.makeGUID();
313313
String linkId = "remove" + divId;
314314

315315
DIV(
316316
id(divId)
317-
.data("fieldName", fieldName)
317+
.data("fieldName", column.getName())
318318
.cl("lk-remove-file"),
319319
(Renderable) ret -> {
320320
renderIconAndFilename(ctx, out, value instanceof String s ? s : filename, false, false);

assay/test/src/org/labkey/test/tests/assay/AssayReimportIndexTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ public void testFileFieldValuesRetainedRunReimport()
166166
var row = new AssayRunsPage(getDriver())
167167
.getTable()
168168
.getRowDataAsMap("Name", runName);
169-
reimportBatchFileValue = StringUtils.trimToNull(row.get("Batch/" + BATCH_FILE_FIELD.getName()));
170-
reimportRunFileValue = StringUtils.trimToNull(row.get(RUN_FILE_FIELD.getName()));
169+
reimportBatchFileValue = StringUtils.trimToNull(row.get("Batch/" + BATCH_FILE_FIELD.getFieldKey()));
170+
reimportRunFileValue = StringUtils.trimToNull(row.get(RUN_FILE_FIELD.getFieldKey().toString()));
171171

172172
checker().verifyEquals("Expected batch file to appear in data", batchFile.getName(), reimportBatchFileValue);
173173
checker().verifyEquals("Expected run file to appear in data", runFile.getName(), reimportRunFileValue);

0 commit comments

Comments
 (0)