added bug annotation

This commit is contained in:
cagache
2016-11-23 14:27:09 +02:00
parent 74f56c198d
commit ce99c122d3
4 changed files with 14 additions and 10 deletions
@@ -6,10 +6,8 @@ import org.alfresco.rest.exception.JsonToModelConversionException;
import org.alfresco.rest.model.RestCommentModel;
import org.alfresco.utility.constants.UserRole;
import org.alfresco.utility.data.DataUser.ListUserWithRoles;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.TestGroup;
import org.alfresco.utility.model.UserModel;
import org.alfresco.utility.model.*;
import org.alfresco.utility.report.Bug;
import org.alfresco.utility.testrail.ExecutionType;
import org.alfresco.utility.testrail.annotation.TestRail;
import org.springframework.http.HttpStatus;
@@ -76,14 +74,16 @@ public class DeleteCommentsSanityTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
}
@Bug(id="MNT-16904")
@TestRail(section = { TestGroup.REST_API,
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails")
public void managerIsNotAbleToDeleteCommentIfAuthenticationFails() throws JsonToModelConversionException, Exception
TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify User gets status code 401 if authentication call fails")
public void userIsNotAbleToDeleteCommentIfAuthenticationFails() throws JsonToModelConversionException, Exception
{
restClient.authenticateUser(adminUserModel);
comment = restClient.withCoreAPI().usingResource(document).addComment("New comment addded by admin");
UserModel nonexistentModel = new UserModel("nonexistentUser", "nonexistentPassword");
restClient.authenticateUser(nonexistentModel);
comment = restClient.withCoreAPI().usingResource(document).addComment("New comment addded by Manager");
restClient.withCoreAPI().usingResource(document).deleteComment(comment);
restClient.assertStatusCodeIs(HttpStatus.UNAUTHORIZED);
restClient.assertStatusCodeIs(HttpStatus.UNAUTHORIZED).assertLastException().hasName(StatusModel.UNAUTHORIZED);
}
}
@@ -115,7 +115,8 @@ public class DeleteSiteMemberSanityTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN)
.assertLastError().containsSummary(ErrorModel.PERMISSION_WAS_DENIED);
}
@Bug(id="MNT-16904")
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE },
executionType = ExecutionType.SANITY,
description = "Verify unauthenticated user is not able to delete another member of the site")
@@ -8,6 +8,7 @@ import org.alfresco.utility.data.DataUser;
import org.alfresco.utility.data.DataUser.ListUserWithRoles;
import org.alfresco.utility.exception.DataPreparationException;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.StatusModel;
import org.alfresco.utility.model.TestGroup;
import org.alfresco.utility.model.UserModel;
import org.alfresco.utility.report.Bug;
@@ -108,6 +109,6 @@ public class GetSiteMembersSanityTests extends RestTest
dataUser.addUserToSite(userModel, siteModel, UserRole.SiteManager);
restClient.authenticateUser(userModel)
.withCoreAPI().usingSite(siteModel).getSiteMembers();
restClient.assertStatusCodeIs(HttpStatus.UNAUTHORIZED);
restClient.assertStatusCodeIs(HttpStatus.UNAUTHORIZED).assertLastException().hasName(StatusModel.UNAUTHORIZED);
}
}
@@ -13,6 +13,7 @@ import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.StatusModel;
import org.alfresco.utility.model.TestGroup;
import org.alfresco.utility.model.UserModel;
import org.alfresco.utility.report.Bug;
import org.alfresco.utility.testrail.ExecutionType;
import org.alfresco.utility.testrail.annotation.TestRail;
import org.springframework.http.HttpStatus;
@@ -112,6 +113,7 @@ public class DeleteTagSanityTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN).assertLastError().containsSummary(ErrorModel.PERMISSION_WAS_DENIED);
}
@Bug(id="MNT-16904")
@TestRail(section = { TestGroup.REST_API,
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user gets status code 401 if authentication call fails")
public void userIsNotAbleToDeleteTagIfAuthenticationFails() throws JsonToModelConversionException, Exception