Skip to content

Commit 100129d

Browse files
committed
Debug/test date parsing
1 parent fe5a56c commit 100129d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

LDK/test/src/org/labkey/test/tests/external/labModules/LabModulesTest.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@
1616
package org.labkey.test.tests.external.labModules;
1717

1818
import org.apache.commons.lang3.StringUtils;
19-
import org.apache.commons.lang3.time.DateFormatUtils;
20-
import org.apache.commons.lang3.time.DateUtils;
2119
import org.apache.commons.lang3.tuple.Pair;
2220
import org.apache.poi.ss.usermodel.Sheet;
2321
import org.apache.poi.ss.usermodel.Workbook;
2422
import org.junit.Assert;
2523
import org.junit.Test;
2624
import org.junit.experimental.categories.Category;
27-
import org.labkey.api.util.DateUtil;
2825
import org.labkey.remoteapi.CommandException;
2926
import org.labkey.remoteapi.Connection;
3027
import org.labkey.remoteapi.collections.CaseInsensitiveHashMap;
@@ -1499,6 +1496,14 @@ private void samplesTableTest() throws Exception
14991496
new Window.WindowFinder(getDriver()).withTitle("Mark Removed").waitFor();
15001497
Ext4FieldRef.getForLabel(this, "Date Removed").setValue("2017-01-02");
15011498
Ext4FieldRef.getForLabel(this, "Comment").setValue("I removed these samples");
1499+
1500+
// TODO: for debugging date. ultimately remove
1501+
checker().withScreenshot("LabModulesTestDate1");
1502+
1503+
// Debug date parsing
1504+
String clientFormattedString = (String)executeScript("return Ext4.Date.format(LDK.ConvertUtils.parseDate('2017-01-02'), 'Y-m-d');");
1505+
assertEquals("Incorrect date parsing", clientFormattedString, "2017-01-02");
1506+
15021507
waitAndClickAndWait(Ext4Helper.Locators.ext4Button("Submit"));
15031508

15041509
dr = new DataRegionTable.DataRegionFinder(getDriver()).withName("query").find();

LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public void addRecordsToAssayTemplate(String[][] data, List<String> expectedColu
193193
for (String[] row : data)
194194
{
195195
sb.append(StringUtils.join(row, '\t'));
196-
sb.append(System.getProperty("line.separator"));
196+
sb.append(System.lineSeparator());
197197
}
198198

199199
_test.waitForText("Sample Information");

0 commit comments

Comments
 (0)