From fd96c90c084d3eb16f3429399108023fac5eaac1 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 22 Mar 2023 16:02:55 +0000 Subject: [PATCH] ACS-4779 Remove test for unsupported use case. --- .../org/alfresco/rest/tags/GetTagTests.java | 39 +++++-------------- .../org/alfresco/rest/tags/GetTagsTests.java | 2 +- 2 files changed, 10 insertions(+), 31 deletions(-) diff --git a/packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/tags/GetTagTests.java b/packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/tags/GetTagTests.java index 944bbd6d2b..8890965195 100644 --- a/packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/tags/GetTagTests.java +++ b/packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/tags/GetTagTests.java @@ -1,5 +1,10 @@ package org.alfresco.rest.tags; +import static org.alfresco.utility.data.RandomData.getRandomName; +import static org.alfresco.utility.report.log.Step.STEP; +import static org.springframework.http.HttpStatus.CREATED; +import static org.springframework.http.HttpStatus.OK; + import org.alfresco.rest.model.RestErrorModel; import org.alfresco.rest.model.RestTagModel; import org.alfresco.utility.constants.UserRole; @@ -10,11 +15,6 @@ import org.alfresco.utility.testrail.annotation.TestRail; import org.springframework.http.HttpStatus; import org.testng.annotations.Test; -import static org.alfresco.utility.data.RandomData.getRandomName; -import static org.alfresco.utility.report.log.Step.STEP; -import static org.springframework.http.HttpStatus.CREATED; -import static org.springframework.http.HttpStatus.OK; - @Test(groups = {TestGroup.REQUIRE_SOLR}) public class GetTagTests extends TagsDataPrep { @@ -140,32 +140,11 @@ public class GetTagTests extends TagsDataPrep } /** - * Verify if count field is present and with value 0 for searched tag. + * Verify that count field is not present for searched tag. */ - @Test(groups = {TestGroup.REST_API, TestGroup.TAGS, TestGroup.REGRESSION}) - public void testGetTag_includingCount() { - STEP("Create single tag as admin"); - final RestTagModel tagModel = createTagModelWithName(getRandomName(TAG_NAME_PREFIX).toLowerCase()); - final RestTagModel createdTag = restClient.authenticateUser(adminUserModel).withCoreAPI().createSingleTag(tagModel); - - restClient.assertStatusCodeIs(CREATED); - - STEP("Get a single tag, including count and verify if it is 0"); - final RestTagModel searchedTag = restClient.withCoreAPI().include(FIELD_COUNT).getTag(createdTag); - - restClient.assertStatusCodeIs(OK); - searchedTag.assertThat().field(FIELD_TAG).is(tagModel.getTag()) - .assertThat().field(FIELD_ID).isNotEmpty() - .assertThat().field(FIELD_COUNT).is(0); - } - - /** - * Verify if count field is not present for searched tag. - */ - - @Test(groups = {TestGroup.REST_API, TestGroup.TAGS, TestGroup.REGRESSION}) - public void testGetTag_notIncludingCount() { + public void testGetTag_notIncludingCount() + { STEP("Create single tag as admin"); final RestTagModel tagModel = createTagModelWithName(getRandomName(TAG_NAME_PREFIX).toLowerCase()); final RestTagModel createdTag = restClient.authenticateUser(adminUserModel).withCoreAPI().createSingleTag(tagModel); @@ -180,4 +159,4 @@ public class GetTagTests extends TagsDataPrep .assertThat().field(FIELD_ID).isNotEmpty() .assertThat().field(FIELD_COUNT).isNull(); } -} \ No newline at end of file +} diff --git a/packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/tags/GetTagsTests.java b/packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/tags/GetTagsTests.java index f4e6a07e67..dc0dbdaef2 100644 --- a/packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/tags/GetTagsTests.java +++ b/packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/tags/GetTagsTests.java @@ -359,7 +359,7 @@ public class GetTagsTests extends TagsDataPrep @Test(groups = {TestGroup.REST_API, TestGroup.TAGS, TestGroup.REGRESSION}) public void testGetTags_includingCount() { - STEP("Get tags including count and verify if it is present int the response"); + STEP("Get tags including count and verify if it is present in the response"); final RestTagModelsCollection searchedTags = restClient.withCoreAPI().include(FIELD_COUNT).getTags(); restClient.assertStatusCodeIs(OK);