mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
TAS-1553 - get start form model by non-network admin
This commit is contained in:
@@ -17,7 +17,7 @@ import org.testng.annotations.Test;
|
||||
/**
|
||||
* Created by Claudia Agache on 10/4/2016.
|
||||
*/
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.DEPLOYMENTS, TestGroup.SANITY, TestGroup.NETWORKS })
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.DEPLOYMENTS, TestGroup.SANITY})
|
||||
public class GetDeploymentsSanityTests extends RestWorkflowTest
|
||||
{
|
||||
@Autowired
|
||||
@@ -49,6 +49,7 @@ public class GetDeploymentsSanityTests extends RestWorkflowTest
|
||||
|
||||
@TestRail(section = { TestGroup.REST_API,
|
||||
TestGroup.DEPLOYMENTS }, executionType = ExecutionType.SANITY, description = "Verify Tenant Admin user gets network deployments using REST API and status code is OK (200)")
|
||||
@Test(groups = { TestGroup.NETWORKS })
|
||||
public void getNetworkDeploymentsWithAdmin() throws JsonToModelConversionException, Exception
|
||||
{
|
||||
tenantApi.useRestClient(restClient);
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package org.alfresco.rest.workflow.processDefinitions;
|
||||
|
||||
import org.alfresco.rest.RestWorkflowTest;
|
||||
import org.alfresco.rest.model.RestProcessDefinitionModel;
|
||||
import org.alfresco.rest.requests.RestProcessDefinitionsApi;
|
||||
import org.alfresco.rest.requests.RestTenantApi;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
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;
|
||||
|
||||
/**
|
||||
* Created by Claudia Agache on 10/18/2016.
|
||||
*/
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.PROCESS_DEFINITION, TestGroup.SANITY })
|
||||
public class GetProcessDefinitionStartFormModelSanityTests extends RestWorkflowTest
|
||||
{
|
||||
@Autowired
|
||||
RestTenantApi tenantApi;
|
||||
@Autowired
|
||||
private DataUser dataUser;
|
||||
@Autowired
|
||||
private RestProcessDefinitionsApi processDefinitionsApi;
|
||||
|
||||
private UserModel adminUserModel, adminTenantUser;
|
||||
private RestProcessDefinitionModel randomProcessDefinition;
|
||||
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void dataPreparation() throws Exception
|
||||
{
|
||||
adminUserModel = dataUser.getAdminUser();
|
||||
adminTenantUser = UserModel.getAdminTenantUser();
|
||||
processDefinitionsApi.useRestClient(restClient);
|
||||
restClient.authenticateUser(adminUserModel);
|
||||
}
|
||||
|
||||
// works on docker
|
||||
@TestRail(section = { TestGroup.REST_API, TestGroup.PROCESS_DEFINITION },
|
||||
executionType = ExecutionType.SANITY,
|
||||
description = "Verify Admin gets a model of the start form type definition for non-network deployments using REST API and status code is OK (200)")
|
||||
public void nonNetworkAdminGetsStartFormModel() throws Exception
|
||||
{
|
||||
randomProcessDefinition = processDefinitionsApi.getProcessDefinitions().getOneRandomEntry();
|
||||
processDefinitionsApi.getProcessDefinitionStartFormModel(randomProcessDefinition).assertEntriesListIsNotEmpty();
|
||||
processDefinitionsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user