mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
updated tests UpdateTag Full and Sanity tests
This commit is contained in:
@@ -3,7 +3,6 @@ package org.alfresco.rest.tags;
|
||||
import org.alfresco.dataprep.CMISUtil;
|
||||
import org.alfresco.rest.RestTest;
|
||||
import org.alfresco.rest.exception.JsonToModelConversionException;
|
||||
import org.alfresco.rest.model.RestErrorModel;
|
||||
import org.alfresco.rest.model.RestTagModel;
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
@@ -88,22 +87,6 @@ public class UpdateTagFullTests extends RestTest
|
||||
returnedModel.assertThat().field("tag").is(specialCharsString);
|
||||
}
|
||||
|
||||
@TestRail(section = { TestGroup.REST_API,
|
||||
TestGroup.TAGS }, executionType = ExecutionType.REGRESSION, description = "Verify Collaborator user can't update tags with Rest API and status code is 403."
|
||||
+ "Check default error model schema.")
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.FULL })
|
||||
public void collaboratorIsNotAbleToUpdateTagCheckDefaultErrorModelSchema() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
String newTag = "newTag";
|
||||
|
||||
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator));
|
||||
restClient.withCoreAPI().usingTag(oldTag).update(newTag);
|
||||
restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN).assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED)
|
||||
.containsErrorKey(RestErrorModel.PERMISSION_DENIED_ERRORKEY)
|
||||
.descriptionURLIs(RestErrorModel.RESTAPIEXPLORER)
|
||||
.stackTraceIs(RestErrorModel.STACKTRACE);
|
||||
}
|
||||
|
||||
@TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify Admin user can provide existing tag for new tag value.")
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.FULL })
|
||||
|
||||
@@ -74,11 +74,14 @@ public class UpdateTagSanityTests extends RestTest
|
||||
@TestRail(section = { TestGroup.REST_API,
|
||||
TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user can't update tags with Rest API and status code is 403")
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.SANITY })
|
||||
public void collaboratorIsNotAbleToUpdateTag() throws JsonToModelConversionException, Exception
|
||||
public void collaboratorIsNotAbleToUpdateTagCheckDefaultErrorModelSchema() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator));
|
||||
restClient.withCoreAPI().usingTag(oldTag).update(randomTag);
|
||||
restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN).assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED);
|
||||
restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN).assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED)
|
||||
.containsErrorKey(RestErrorModel.PERMISSION_DENIED_ERRORKEY)
|
||||
.descriptionURLIs(RestErrorModel.RESTAPIEXPLORER)
|
||||
.stackTraceIs(RestErrorModel.STACKTRACE);
|
||||
}
|
||||
|
||||
@TestRail(section = { TestGroup.REST_API,
|
||||
|
||||
Reference in New Issue
Block a user