Permalink
Browse files

distinguish starting proc vs proc with var as per PR1 to stop skipping

  • Loading branch information...
ryandawsonuk committed Dec 10, 2018
1 parent 4536445 commit 2f419334409ef10cf5d25ecd6ea52f5ae84b4a85
@@ -107,7 +107,7 @@ public void startProcess(String processName, String variableName1, String variab
checkProcessWithTaskCreated(processName);
}

@When("the user starts a $processName")
@When("the user starts an instance of the process called $processName")
public void startProcess(String processName) {

processInstance = processRuntimeBundleSteps.startProcess(processDefinitionKeyMatcher(processName));
@@ -219,19 +219,20 @@ public void verifyProcessAndTasksStatus() throws Exception {

@Then("the status of the process is changed to completed")
public void verifyProcessStatus() throws Exception {

processQuerySteps.checkProcessInstanceStatus(processInstance.getId(),
String processId = Serenity.sessionVariableCalled("processInstanceId");
processQuerySteps.checkProcessInstanceStatus(processId,
ProcessInstance.ProcessInstanceStatus.COMPLETED);
auditSteps.checkProcessInstanceEvent(processInstance.getId(), ProcessRuntimeEvent.ProcessEvents.PROCESS_COMPLETED);
auditSteps.checkProcessInstanceEvent(processId, ProcessRuntimeEvent.ProcessEvents.PROCESS_COMPLETED);
}

@Then("a variable was created with name $variableName")
@When("a variable was created with name $variableName")
public void verifyVariableCreated(String variableName) throws Exception {
String processId = Serenity.sessionVariableCalled("processInstanceId");

processQuerySteps.checkProcessInstanceHasVariable(processInstance.getId(),
processQuerySteps.checkProcessInstanceHasVariable(processId,
variableName);
auditSteps.checkProcessInstanceVariableEvent(processInstance.getId(),
auditSteps.checkProcessInstanceVariableEvent(processId,
variableName,
VariableEvent.VariableEvents.VARIABLE_CREATED);

@@ -23,19 +23,19 @@ Then the process cannot be activated anymore

Scenario: show a process instance diagram
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITH_VARIABLES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_VARIABLES
And open the process diagram
Then the diagram is shown

Scenario: show diagram for a process instance without graphic info
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITHOUT_GRAPHIC_INFO
When the user starts an instance of the process called PROCESS_INSTANCE_WITHOUT_GRAPHIC_INFO
And open the process diagram
Then no diagram is shown

Scenario: complete a process instance that uses a connector
Given the user is authenticated as testuser
When the user starts a CONNECTOR_PROCESS_INSTANCE
When the user starts an instance of the process called CONNECTOR_PROCESS_INSTANCE
Then the status of the process is changed to completed
And a variable was created with name var1

@@ -45,17 +45,17 @@ Then The user gets all the process definitions in admin endpoint

Scenario: retrieve process instances as an admin
Given the user is authenticated as hradmin
When the user starts a PROCESS_INSTANCE_WITH_VARIABLES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_VARIABLES
Then the user can get process with variables instances in admin endpoint

Scenario: query process instances as an admin
Given the user is authenticated as hradmin
When the user starts a PROCESS_INSTANCE_WITH_VARIABLES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_VARIABLES
Then the user can query process with variables instances in admin endpoints

Scenario: get events as an admin
Given the user is authenticated as hradmin
When the user starts a PROCESS_INSTANCE_WITH_VARIABLES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_VARIABLES
Then the user can get events for process with variables instances in admin endpoint

Scenario: check the presence of formKey field in task
@@ -64,7 +64,7 @@ Then the PROCESS_INSTANCE_WITH_SINGLE_TASK_ASSIGNED definition has the formKey f

Scenario: check the process is updated
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITH_SINGLE_TASK_ASSIGNED
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_SINGLE_TASK_ASSIGNED
And the user updates the name of the process instance to new-process-name
Then the process instance is updated
And the process has the name new-process-name
@@ -7,7 +7,7 @@ So that I can get results on a running process

Scenario: claim and complete tasks in a running process
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITH_VARIABLES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_VARIABLES
And the user claims the task
And the user completes the task
Then the status of the process and the task is changed to completed
@@ -37,42 +37,42 @@ Then a list of one subtask is be available for the task

Scenario: create a process with assigned tasks and complete it
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITH_SINGLE_TASK_ASSIGNED
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_SINGLE_TASK_ASSIGNED
And the status of the task since the beginning is ASSIGNED
And the user completes the task
Then the status of the process and the task is changed to completed

Scenario: create a process with user candidates, claim a task and complete it
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITH_SINGLE_TASK_AND_USER_CANDIDATES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_SINGLE_TASK_AND_USER_CANDIDATES
And the status of the task is CREATED
And the user claims the task
And the user completes the task
Then the status of the process and the task is changed to completed

Scenario: create a process with group candidates, claim a task and complete it
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITH_SINGLE_TASK_AND_GROUP_CANDIDATES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_SINGLE_TASK_AND_GROUP_CANDIDATES
And the status of the task is CREATED
And the user claims the task
And the user completes the task
Then the status of the process and the task is changed to completed

Scenario: cannot complete a task that has already been completed
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITH_SINGLE_TASK_ASSIGNED
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_SINGLE_TASK_ASSIGNED
And the user completes the task
Then the user cannot complete the task

Scenario: cannot claim a task that belongs to different candidate group
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITH_SINGLE_TASK_AND_GROUP_CANDIDATES_FOR_TESTGROUP
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_SINGLE_TASK_AND_GROUP_CANDIDATES_FOR_TESTGROUP
And another user is authenticated as hruser
Then the task cannot be claimed by user

Scenario: cannot claim a task that has already been claimed
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITH_SINGLE_TASK_AND_USER_CANDIDATES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_SINGLE_TASK_AND_USER_CANDIDATES
And the status of the task is CREATED
And the user claims the task
And the status of the task is ASSIGNED
@@ -81,7 +81,7 @@ Then the task cannot be claimed by user

Scenario: cannot see tasks that belongs to different candidate group
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITH_SINGLE_TASK_AND_GROUP_CANDIDATES_FOR_TESTGROUP
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_SINGLE_TASK_AND_GROUP_CANDIDATES_FOR_TESTGROUP
And the user claims the task
And the status of the task is ASSIGNED
And the user completes the task
@@ -91,12 +91,12 @@ Then tasks of PROCESS_INSTANCE_WITH_SINGLE_TASK_AND_GROUP_CANDIDATES_FOR_TESTGRO

Scenario: subprocess task is created when starting a parent process with call activities
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITH_CALL_ACTIVITIES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_CALL_ACTIVITIES
Then the task from SUB_PROCESS_INSTANCE_WITH_TASK is CREATED and it is called subprocess-task

Scenario: check the presence of formKey field in task
Given the user is authenticated as testuser
When the user starts a PROCESS_INSTANCE_WITH_SINGLE_TASK_ASSIGNED
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_SINGLE_TASK_ASSIGNED
Then the tasks has the formKey field

Scenario: tasks have their own copies of variables
@@ -7,22 +7,22 @@ So that I can check the enforcement of security policies

Scenario: getting process instances
Given the user is authenticated as hradmin
When the user starts a PROCESS_INSTANCE_WITH_VARIABLES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_VARIABLES
Then the user can get process with variables instances in admin endpoint

Scenario: querying process instances
Given the user is authenticated as hradmin
When the user starts a PROCESS_INSTANCE_WITH_VARIABLES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_VARIABLES
Then the user can query process with variables instances in admin endpoints

Scenario: getting events
Given the user is authenticated as hradmin
When the user starts a PROCESS_INSTANCE_WITH_VARIABLES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_VARIABLES
Then the user can get events for process with variables instances in admin endpoint

Scenario:
Given the user is authenticated as hradmin
When the user starts a PROCESS_INSTANCE_WITH_VARIABLES
When the user starts an instance of the process called PROCESS_INSTANCE_WITH_VARIABLES
Then the user cannot get process with variables instances
And the user cannot query process with variables instances
And the user cannot get events for process with variables instances
@@ -7,7 +7,7 @@ So that I can check the enforcement of security policies

Scenario: starting an instance of a simple process
Given the user is authenticated as hruser
When the user starts a SIMPLE_PROCESS_INSTANCE
When the user starts an instance of the process called SIMPLE_PROCESS_INSTANCE
Then the user can get simple process instances
And the user can query simple process instances
And the user can get events for simple process instances

0 comments on commit 2f41933

Please sign in to comment.