|
4 | 4 | import org.junit.Test; |
5 | 5 | import org.junit.experimental.categories.Category; |
6 | 6 | import org.labkey.remoteapi.CommandException; |
| 7 | +import org.labkey.remoteapi.SimpleGetCommand; |
7 | 8 | import org.labkey.remoteapi.experiment.LineageCommand; |
8 | 9 | import org.labkey.remoteapi.experiment.LineageNode; |
9 | 10 | import org.labkey.remoteapi.experiment.LineageResponse; |
|
12 | 13 | import org.labkey.remoteapi.query.SelectRowsResponse; |
13 | 14 | import org.labkey.test.BaseWebDriverTest; |
14 | 15 | import org.labkey.test.Locator; |
| 16 | +import org.labkey.test.WebTestHelper; |
15 | 17 | import org.labkey.test.TestFileUtils; |
16 | 18 | import org.labkey.test.TestTimeoutException; |
17 | 19 | import org.labkey.test.categories.Daily; |
@@ -842,7 +844,7 @@ public void testDeleteLineageParent() throws IOException, CommandException |
842 | 844 | // create a sample type with the following explicit domain columns |
843 | 845 | SampleTypeDefinition sampleType = new SampleTypeDefinition("Family"); |
844 | 846 | TestDataGenerator sampleGenerator = sampleType.create(createDefaultConnection(), getProjectName()); |
845 | | - |
| 847 | + |
846 | 848 | sampleGenerator.addRow(List.of("A")); |
847 | 849 | sampleGenerator.addRow(List.of("B")); |
848 | 850 | sampleGenerator.addCustomRow(Map.of("name", "C", "MaterialInputs/Family", "A,B")); |
@@ -1216,4 +1218,20 @@ public void testDeleteSamplesSomeWithDerivedSamples() |
1216 | 1218 |
|
1217 | 1219 | } |
1218 | 1220 |
|
| 1221 | + @Test |
| 1222 | + public void testDiagnosticActions() throws IOException, CommandException |
| 1223 | + { |
| 1224 | + // CycleCheckAction: confirm the page loads and the acyclic test data reports no cycles |
| 1225 | + beginAt(WebTestHelper.buildURL("experiment", PROJECT_NAME, "cycleCheck")); |
| 1226 | + assertTextPresent("This operation can use a lot of memory."); |
| 1227 | + clickButton("Continue"); |
| 1228 | + assertTextPresent("No cycles found"); |
| 1229 | + |
| 1230 | + // CheckEdgesAction: confirm the API returns success with an empty cycle list |
| 1231 | + var cmd = new SimpleGetCommand("experiment", "checkEdges"); |
| 1232 | + Map<String, Object> response = cmd.execute(createDefaultConnection(), "/" + PROJECT_NAME).getParsedData(); |
| 1233 | + assertEquals("CheckEdgesAction should report success", Boolean.TRUE, response.get("success")); |
| 1234 | + assertTrue("CheckEdgesAction should find no cycle edges", ((List<?>) response.get("result")).isEmpty()); |
| 1235 | + } |
| 1236 | + |
1219 | 1237 | } |
0 commit comments