|
18 | 18 |
|
19 | 19 | import org.junit.Test; |
20 | 20 | import org.junit.experimental.categories.Category; |
| 21 | +import org.labkey.remoteapi.CommandException; |
21 | 22 | import org.labkey.remoteapi.assay.AssayListCommand; |
22 | 23 | import org.labkey.remoteapi.assay.AssayListResponse; |
23 | 24 | import org.labkey.test.Locator; |
24 | 25 | import org.labkey.test.TestFileUtils; |
25 | 26 | import org.labkey.test.TestTimeoutException; |
| 27 | +import org.labkey.test.WebTestHelper; |
26 | 28 | import org.labkey.test.categories.Assays; |
27 | 29 | import org.labkey.test.categories.Daily; |
28 | 30 | import org.labkey.test.components.CustomizeView; |
|
35 | 37 | import org.labkey.test.params.experiment.SampleTypeDefinition; |
36 | 38 | import org.labkey.test.tests.AbstractAssayTest; |
37 | 39 | import org.labkey.test.tests.AuditLogTest; |
| 40 | +import org.labkey.test.util.AuditLogHelper; |
38 | 41 | import org.labkey.test.util.DataRegionTable; |
39 | 42 | import org.labkey.test.util.LogMethod; |
40 | 43 | import org.labkey.test.util.SampleTypeHelper; |
41 | 44 | import org.labkey.test.util.StudyHelper; |
42 | 45 |
|
43 | 46 | import java.io.File; |
| 47 | +import java.io.IOException; |
44 | 48 | import java.util.ArrayList; |
45 | 49 | import java.util.List; |
46 | 50 |
|
@@ -267,7 +271,7 @@ private void verifyWebdavTree() |
267 | 271 | } |
268 | 272 |
|
269 | 273 | @LogMethod |
270 | | - private void editResults() |
| 274 | + private void editResults() throws IOException, CommandException |
271 | 275 | { |
272 | 276 | // Verify that the results aren't editable by default |
273 | 277 | navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1); |
@@ -310,15 +314,13 @@ private void editResults() |
310 | 314 | }); |
311 | 315 |
|
312 | 316 | // Verify that the edit was audited |
| 317 | + AuditLogHelper auditLogHelper = new AuditLogHelper(this, () -> WebTestHelper.getRemoteApiConnection(false)); |
| 318 | + auditLogHelper.checkAuditEventDiffCount(getProjectName(), AuditLogHelper.AuditEvent.QUERY_UPDATE_AUDIT_EVENT, List.of(0/*delete*/, 4/*edit*/)); |
| 319 | + |
313 | 320 | goToSchemaBrowser(); |
314 | 321 | viewQueryData("auditLog", "ExperimentAuditEvent"); |
315 | | - assertTextPresent( |
316 | | - "Data row, id ", |
317 | | - ", edited in " + TEST_ASSAY + ".", |
318 | | - "Specimen ID changed from 'AAA07XK5-05' to 'EditedSpecimenID'", |
319 | | - "Visit ID changed from '601.0' to '601.5", |
320 | | - "testAssayDataProp5 changed from blank to '514801'", |
321 | | - "Deleted data row, id "); |
| 322 | + assertTextPresent("1 data row has been edited in " + TEST_ASSAY + "."); |
| 323 | + |
322 | 324 | } |
323 | 325 |
|
324 | 326 | /** |
|
0 commit comments