Fix failing tests due to framework extention

This commit is contained in:
Valentin Popa
2016-09-30 14:07:16 +03:00
parent 9ede329cae
commit bc988f10e4
5 changed files with 56 additions and 37 deletions

View File

@@ -2,6 +2,7 @@ package org.alfresco.rest.demo;
import org.alfresco.dataprep.CMISUtil.DocumentType;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.body.CommentContent;
import org.alfresco.rest.body.SiteMember;
import org.alfresco.rest.exception.JsonToModelConversionException;
import org.alfresco.rest.model.RestCommentModel;
@@ -82,9 +83,8 @@ public class RestDemoTests extends RestTest
.assertCommentWithIdExists(commentEntry);
// update comment
commentEntry = commentsAPI.updateComment(fileModel,
commentEntry,
"This is the updated comment");
CommentContent commentContent = new CommentContent("This is the updated comment with Collaborator user");
commentEntry = commentsAPI.updateComment(fileModel, commentEntry, commentContent);
commentsAPI.getNodeComments(fileModel)
.assertResponseIsNotEmpty()

View File

@@ -2,6 +2,7 @@ package org.alfresco.rest.demo;
import org.alfresco.dataprep.CMISUtil.DocumentType;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.body.CommentContent;
import org.alfresco.rest.exception.JsonToModelConversionException;
import org.alfresco.rest.model.RestCommentModel;
import org.alfresco.rest.requests.RestCommentsApi;
@@ -61,11 +62,10 @@ public class SampleCommentsTests extends RestTest
description= "Verify admin user updates comments with Rest API")
public void adminShouldUpdateComment() throws JsonToModelConversionException, Exception
{
// add initial comment
RestCommentModel commentModel = commentsAPI.addComment(document, "This is a new comment");
// update comment
RestCommentModel commentEntry = commentsAPI.updateComment(document, commentModel, "This is the updated comment");
CommentContent commentContent = new CommentContent("This is the updated comment with Collaborator user");
RestCommentModel commentEntry = commentsAPI.updateComment(document, commentModel, commentContent);
commentEntry.assertCommentContentIs("This is the updated comment");
}

View File

@@ -40,11 +40,4 @@ public class SamplePeopleTests extends RestTest
.assertStatusCodeIs(HttpStatus.OK);
}
@TestRail(section={"demo", "sample-section"}, executionType= ExecutionType.SANITY,
description = "Admin user gets own person information with Rest Api and assert that name is correct")
public void adminShouldRetrieveItself() throws Exception
{
peopleAPI.getPerson(adminUser).assertPersonHasName(adminUser);
}
}