@@ -437,13 +437,40 @@ public void testCuratorSendsCommentsToAuthor() {
437437 // .body("data[3].reasonsForReturn", equalTo(null))
438438 .statusCode (OK .getStatusCode ());
439439
440- // Confirm that when getting the dataset, the "InReview" lock is no longer listed
441- JsonArray emptyArray = Json .createArrayBuilder ().build ();
442- getDatasetJson = UtilIT .nativeGet (datasetId , authorApiToken );
443- getDatasetJson .prettyPrint ();
444- getDatasetJson .then ().assertThat ()
445- .body ("data.locks" , equalTo (emptyArray ))
446- .statusCode (200 );
440+ // The author realizes she wants to add another file and creates a new draft version.
441+ Response authorAddsNewFileCreatingNewDraft = UtilIT .uploadFileViaNative (datasetId .toString (), pathToFile1 , authorApiToken );
442+ authorAddsNewFileCreatingNewDraft .prettyPrint ();
443+ authorAddsNewFileCreatingNewDraft .then ().assertThat ()
444+ .statusCode (OK .getStatusCode ());
445+
446+ // The author re-submits.
447+ Response submit4 = UtilIT .submitDatasetForReview (datasetPersistentId , authorApiToken );
448+ submit4 .prettyPrint ();
449+ submit4 .then ().assertThat ()
450+ .body ("data.inReview" , equalTo (true ))
451+ .statusCode (OK .getStatusCode ());
452+
453+ // The curator checks notifications and sees that the dataset has been re-submitted after it was published.
454+ Response curatorChecksForNotificationsPostPublication = UtilIT .getNotifications (curatorApiToken );
455+ curatorChecksForNotificationsPostPublication .prettyPrint ();
456+ curatorChecksForNotificationsPostPublication .then ().assertThat ()
457+ .body ("data[0].type" , equalTo (SUBMITTEDDS .toString ()))
458+ .body ("data[1].type" , equalTo (PUBLISHEDDS .toString ()))
459+ .statusCode (OK .getStatusCode ());
460+
461+ // The curator checks again, this time in app notification format.
462+ Response curatorChecksForNotificationsPostPublicationInAppFormat = UtilIT .getNotifications (curatorApiToken , true , null , null , null );
463+ curatorChecksForNotificationsPostPublicationInAppFormat .prettyPrint ();
464+ curatorChecksForNotificationsPostPublicationInAppFormat .then ().assertThat ()
465+ .body ("data[0].type" , equalTo (SUBMITTEDDS .toString ()))
466+ .body ("data[0].objectDeleted" , equalTo (null ))
467+ .body ("data[0].datasetPersistentIdentifier" , equalTo (datasetPersistentId ))
468+ .body ("data[0].ownerAlias" , equalTo (dataverseAlias ))
469+ .body ("data[1].type" , equalTo (PUBLISHEDDS .toString ()))
470+ .body ("data[1].objectDeleted" , equalTo (null ))
471+ .body ("data[1].datasetPersistentIdentifier" , equalTo (datasetPersistentId ))
472+ .body ("data[1].ownerAlias" , equalTo (dataverseAlias ))
473+ .statusCode (OK .getStatusCode ());
447474
448475 // These println's are here in case you want to log into the GUI to see what notifications look like.
449476 System .out .println ("Curator username/password: " + curatorUsername );
0 commit comments