|
1 | 1 | package org.labkey.test.tests; |
2 | 2 |
|
| 3 | +import org.assertj.core.api.Assertions; |
3 | 4 | import org.junit.Before; |
4 | 5 | import org.junit.BeforeClass; |
5 | 6 | import org.junit.Test; |
|
17 | 18 | import org.labkey.test.util.PortalHelper; |
18 | 19 | import org.labkey.test.util.TestDataGenerator; |
19 | 20 | import org.labkey.test.util.exp.DataClassAPIHelper; |
| 21 | +import org.labkey.test.util.search.SearchAdminAPIHelper; |
20 | 22 | import org.openqa.selenium.WebElement; |
21 | 23 | import org.openqa.selenium.support.ui.ExpectedConditions; |
22 | 24 |
|
23 | 25 | import java.io.File; |
| 26 | +import java.time.Duration; |
24 | 27 | import java.util.ArrayList; |
25 | 28 | import java.util.Arrays; |
26 | 29 | import java.util.List; |
@@ -99,11 +102,11 @@ public void testExportImportSimpleDataClass() throws Exception |
99 | 102 |
|
100 | 103 | TestDataGenerator testDgen = DataClassAPIHelper.createEmptyDataClass(subfolderPath, testType); |
101 | 104 |
|
102 | | - testDgen.addCustomRow(Map.of("Name", "class1", "intColumn", 1, "decimalColumn", 1.1, "stringColumn", "one")); |
103 | | - testDgen.addCustomRow(Map.of("Name", "class2", "intColumn", 2, "decimalColumn", 2.2, "stringColumn", "two")); |
104 | | - testDgen.addCustomRow(Map.of("Name", "class3", "intColumn", 3, "decimalColumn", 3.3, "stringColumn", "three")); |
105 | | - testDgen.addCustomRow(Map.of("Name", "class4", "intColumn", 4, "decimalColumn", 4.4, "stringColumn", "four")); |
106 | | - testDgen.addCustomRow(Map.of("Name", "class5", "intColumn", 5, "decimalColumn", 5.5, "stringColumn", "five")); |
| 105 | + testDgen.addCustomRow(Map.of("Name", "class1", "intColumn", 7771, "decimalColumn", 1.1, "stringColumn", "one")); |
| 106 | + testDgen.addCustomRow(Map.of("Name", "class2", "intColumn", 7772, "decimalColumn", 2.2, "stringColumn", "two")); |
| 107 | + testDgen.addCustomRow(Map.of("Name", "class3", "intColumn", 7773, "decimalColumn", 3.3, "stringColumn", "three")); |
| 108 | + testDgen.addCustomRow(Map.of("Name", "class4", "intColumn", 7774, "decimalColumn", 4.4, "stringColumn", "four")); |
| 109 | + testDgen.addCustomRow(Map.of("Name", "class5", "intColumn", 7775, "decimalColumn", 5.5, "stringColumn", "five")); |
107 | 110 | testDgen.insertRows(); |
108 | 111 |
|
109 | 112 | PortalHelper portalHelper = new PortalHelper(this); |
@@ -158,6 +161,14 @@ public void testExportImportSimpleDataClass() throws Exception |
158 | 161 | assertNotNull("expect all matching rows to come through", matchingMap); |
159 | 162 | assertEquals("Expect imported rows to be equivalent to exported ones", exportedRow, matchingMap); |
160 | 163 | } |
| 164 | + |
| 165 | + SearchAdminAPIHelper.waitForIndexer(); |
| 166 | + |
| 167 | + var searchResultPage = navBar().search("7774"); |
| 168 | + // Issue 52961: DataClass: Integer fields are not index for data class, unlike sample types |
| 169 | + checker().withScreenshot("Search by int value after folder import").awaiting(Duration.ofSeconds(2), |
| 170 | + ()-> Assertions.assertThat(searchResultPage.getResultCount() >= 2).isTrue()); |
| 171 | + |
161 | 172 | } |
162 | 173 |
|
163 | 174 | @Test |
|
0 commit comments