aboutsummaryrefslogtreecommitdiffstats
path: root/workflow/workflow-bdd/features/WorkflowList.feature
blob: 0ce680ed427bca2d176a2617790c22a2d25402f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Feature: List Workflows

  Background: Init - create various workflows in order to test list filter
    Given I want to create a Workflow
    And I want to copy to property "noVersionsWorkflowId" from response data path "id"

    Given I want to create a Workflow
    And I want to copy to property "draftVersionWorkflowId" from response data path "id"
    And I want to update the input property "description" with value "first version"
    And I want to create for path "/workflows/{item.id}/versions" with the input data from the context

    Given I want to create a Workflow
    And I want to copy to property "certifiedVersionWorkflowId" from response data path "id"
    And I want to update the input property "description" with value "first version"
    And I want to create for path "/workflows/{item.id}/versions" with the input data from the context
    And I want to update the input property "name" with value "CERTIFIED"
    And I want to create for path "/workflows/{item.id}/versions/{responseData.id}/state" with the input data from the context

    Given I want to create a Workflow
    And I want to copy to property "draftAndCertifiedVersionWorkflowId" from response data path "id"
    And I want to update the input property "description" with value "first version"
    And I want to create for path "/workflows/{item.id}/versions" with the input data from the context
    And I want to copy to property "item.versionId" from response data path "id"
    And I want to update the input property "name" with value "CERTIFIED"
    And I want to create for path "/workflows/{item.id}/versions/{item.versionId}/state" with the input data from the context
    And I want to update the input property "description" with value "second version"
    And I want to update the input property "baseVersionId" with value of property "item.versionId"
    And I want to create for path "/workflows/{item.id}/versions" with the input data from the context
    #And I want to print the context data

  Scenario: List all
    When I want to get path "/workflows"
    Then I want to check that element in the response list with "id" equals to value of saved property "noVersionsWorkflowId" exists
    And I want to check that element in the response list with "id" equals to value of saved property "draftVersionWorkflowId" exists
    And I want to check that element in the response list with "id" equals to value of saved property "certifiedVersionWorkflowId" exists
    And I want to check that element in the response list with "id" equals to value of saved property "draftAndCertifiedVersionWorkflowId" exists

  Scenario: List ones with DRAFT version(s)
    When I want to get path "/workflows?versionState=DRAFT"
    Then I want to check that element in the response list with "id" equals to value of saved property "noVersionsWorkflowId" does not exist
    Then I want to check that element in the response list with "id" equals to value of saved property "draftVersionWorkflowId" exists
    Then I want to check that element in the response list with "id" equals to value of saved property "certifiedVersionWorkflowId" does not exist
    Then I want to check that element in the response list with "id" equals to value of saved property "draftAndCertifiedVersionWorkflowId" exists

  Scenario: List ones with CERTIFIED version(s)
    When I want to get path "/workflows?versionState=CERTIFIED"
    Then I want to check that element in the response list with "id" equals to value of saved property "noVersionsWorkflowId" does not exist
    Then I want to check that element in the response list with "id" equals to value of saved property "draftVersionWorkflowId" does not exist
    Then I want to check that element in the response list with "id" equals to value of saved property "certifiedVersionWorkflowId" exists
    Then I want to check that element in the response list with "id" equals to value of saved property "draftAndCertifiedVersionWorkflowId" exists

  Scenario: List ones with DRAFT/CERTIFIED version(s)
    When I want to get path "/workflows?versionState=DRAFT,CERTIFIED"
    Then I want to check that element in the response list with "id" equals to value of saved property "noVersionsWorkflowId" does not exist
    Then I want to check that element in the response list with "id" equals to value of saved property "draftVersionWorkflowId" exists
    Then I want to check that element in the response list with "id" equals to value of saved property "certifiedVersionWorkflowId" exists
    Then I want to check that element in the response list with "id" equals to value of saved property "draftAndCertifiedVersionWorkflowId" exists

  Scenario: List ones with gibberish version(s) = none
    When I want to get path "/workflows?versionState=gibberish"
    Then I want to check that element in the response list with "id" equals to value of saved property "noVersionsWorkflowId" does not exist
    Then I want to check that element in the response list with "id" equals to value of saved property "draftVersionWorkflowId" does not exist
    Then I want to check that element in the response list with "id" equals to value of saved property "certifiedVersionWorkflowId" does not exist
    Then I want to check that element in the response list with "id" equals to value of saved property "draftAndCertifiedVersionWorkflowId" does not exist