Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
distinguish starting proc vs proc with var as per PR1 to stop skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandawsonuk committed Dec 10, 2018
1 parent 4536445 commit 2f41933
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 28 deletions.
Expand Up @@ -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));
Expand Down Expand Up @@ -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);

Expand Down
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Expand Up @@ -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
Expand Up @@ -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
Expand Down

0 comments on commit 2f41933

Please sign in to comment.