|
19 | 19 | import org.junit.Test; |
20 | 20 | import org.junit.experimental.categories.Category; |
21 | 21 | import org.labkey.remoteapi.CommandException; |
| 22 | +import org.labkey.remoteapi.SimpleGetCommand; |
22 | 23 | import org.labkey.remoteapi.experiment.LineageCommand; |
23 | 24 | import org.labkey.remoteapi.experiment.LineageNode; |
24 | 25 | import org.labkey.remoteapi.experiment.LineageResponse; |
|
29 | 30 | import org.labkey.test.Locator; |
30 | 31 | import org.labkey.test.TestFileUtils; |
31 | 32 | import org.labkey.test.TestTimeoutException; |
| 33 | +import org.labkey.test.WebTestHelper; |
32 | 34 | import org.labkey.test.categories.Daily; |
33 | 35 | import org.labkey.test.components.ext4.Window; |
34 | 36 | import org.labkey.test.params.FieldDefinition; |
@@ -70,7 +72,7 @@ public class SampleTypeLineageTest extends BaseWebDriverTest |
70 | 72 | @Override |
71 | 73 | public List<String> getAssociatedModules() |
72 | 74 | { |
73 | | - return Arrays.asList("experiment"); |
| 75 | + return List.of("experiment"); |
74 | 76 | } |
75 | 77 |
|
76 | 78 | @Override |
@@ -857,7 +859,7 @@ public void testDeleteLineageParent() throws IOException, CommandException |
857 | 859 | // create a sample type with the following explicit domain columns |
858 | 860 | SampleTypeDefinition sampleType = new SampleTypeDefinition("Family"); |
859 | 861 | TestDataGenerator sampleGenerator = sampleType.create(createDefaultConnection(), getProjectName()); |
860 | | - |
| 862 | + |
861 | 863 | sampleGenerator.addRow(List.of("A")); |
862 | 864 | sampleGenerator.addRow(List.of("B")); |
863 | 865 | sampleGenerator.addCustomRow(Map.of("name", "C", "MaterialInputs/Family", "A,B")); |
@@ -1231,4 +1233,19 @@ public void testDeleteSamplesSomeWithDerivedSamples() |
1231 | 1233 |
|
1232 | 1234 | } |
1233 | 1235 |
|
| 1236 | + @Test |
| 1237 | + public void testDiagnosticActions() throws IOException, CommandException |
| 1238 | + { |
| 1239 | + // CycleCheckAction: confirm the page loads and the acyclic test data reports no cycles |
| 1240 | + beginAt(WebTestHelper.buildURL("experiment", PROJECT_NAME, "cycleCheck")); |
| 1241 | + assertTextPresent("This operation can use a lot of memory."); |
| 1242 | + clickButton("Continue"); |
| 1243 | + assertTextPresent("No cycles found"); |
| 1244 | + |
| 1245 | + // CheckEdgesAction: confirm the API returns success with an empty cycle list |
| 1246 | + var cmd = new SimpleGetCommand("experiment", "checkEdges"); |
| 1247 | + Map<String, Object> response = cmd.execute(createDefaultConnection(), "/" + PROJECT_NAME).getParsedData(); |
| 1248 | + assertEquals("CheckEdgesAction should report success", Boolean.TRUE, response.get("success")); |
| 1249 | + assertEquals("CheckEdgesAction should find no cycle edges", List.of(), response.get("result")); |
| 1250 | + } |
1234 | 1251 | } |
0 commit comments