mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
Merge branch 'TAS-1936' into '5.1.N-newDSL'
Tas 1936 See merge request !189
This commit is contained in:
+11
-22
@@ -1,15 +1,12 @@
|
||||
package org.alfresco.rest.workflow.deployments;
|
||||
|
||||
import org.alfresco.rest.RestWorkflowTest;
|
||||
import org.alfresco.rest.RestTest;
|
||||
import org.alfresco.rest.exception.JsonToModelConversionException;
|
||||
import org.alfresco.rest.requests.RestDeploymentsApi;
|
||||
import org.alfresco.rest.requests.RestTenantApi;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.alfresco.rest.model.RestDeploymentModelsCollection;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -18,16 +15,10 @@ import org.testng.annotations.Test;
|
||||
* Created by Claudia Agache on 10/4/2016.
|
||||
*/
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.DEPLOYMENTS, TestGroup.SANITY})
|
||||
public class GetDeploymentsSanityTests extends RestWorkflowTest
|
||||
public class GetDeploymentsSanityTests extends RestTest
|
||||
{
|
||||
@Autowired
|
||||
RestTenantApi tenantApi;
|
||||
@Autowired
|
||||
private DataUser dataUser;
|
||||
@Autowired
|
||||
private RestDeploymentsApi deploymentsApi;
|
||||
|
||||
private UserModel adminUserModel, adminTenantUser;
|
||||
private RestDeploymentModelsCollection deployments;
|
||||
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void dataPreparation() throws Exception
|
||||
@@ -35,16 +26,15 @@ public class GetDeploymentsSanityTests extends RestWorkflowTest
|
||||
adminUserModel = dataUser.getAdminUser();
|
||||
adminTenantUser = UserModel.getAdminTenantUser();
|
||||
restClient.authenticateUser(adminUserModel);
|
||||
deploymentsApi.useRestClient(restClient);
|
||||
}
|
||||
|
||||
@TestRail(section = { TestGroup.REST_API,
|
||||
TestGroup.DEPLOYMENTS }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets non-network deployments using REST API and status code is OK (200)")
|
||||
public void getNonNetworkDeploymentsWithAdmin() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
restClient.authenticateUser(adminUserModel);
|
||||
deploymentsApi.getDeployments().assertThat().entriesListIsNotEmpty();
|
||||
deploymentsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK);
|
||||
deployments = restClient.authenticateUser(adminUserModel).withWorkflowAPI().getDeployments();
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
deployments.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@TestRail(section = { TestGroup.REST_API,
|
||||
@@ -52,10 +42,9 @@ public class GetDeploymentsSanityTests extends RestWorkflowTest
|
||||
@Test(groups = { TestGroup.NETWORKS })
|
||||
public void getNetworkDeploymentsWithAdmin() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
tenantApi.useRestClient(restClient);
|
||||
tenantApi.createTenant(adminTenantUser);
|
||||
restClient.authenticateUser(adminTenantUser);
|
||||
deploymentsApi.getDeployments().assertThat().entriesListIsNotEmpty();
|
||||
deploymentsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK);
|
||||
restClient.usingTenant().createTenant(adminTenantUser);
|
||||
deployments = restClient.authenticateUser(adminTenantUser).withWorkflowAPI().getDeployments();
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
deployments.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user