Add activity spec code
[sdc/sdc-workflow-designer.git] / workflow-bdd / features / ActivitySpec.feature
1 Feature: Activity Spec
2
3    #SDC-6350
4   Scenario: Create
5     When I want to set the input data to file "resources/json/createActivitySpec.json"
6     Then I want to update the input property "name" with a random value
7     When I want to create an ActivitySpec
8
9     Then I want to check property "id" exists
10     And I want to check property "versionId" exists
11
12     And I want to list ActivitySpecs with status "Draft"
13     And I want to check property "total" exists
14
15     And I want to get the ActivitySpec for the current item
16     And I want to check property "status" for value "Draft"
17
18     And I want to call action "CERTIFY" on this ActivitySpec item
19     And I want to get the ActivitySpec for the current item
20     And I want to check property "status" for value "Certified"
21
22     And I want to call action "DEPRECATE" on this ActivitySpec item
23     And I want to get the ActivitySpec for the current item
24     And I want to check property "status" for value "Deprecated"
25
26     And I want to call action "DELETE" on this ActivitySpec item
27     And I want to get the ActivitySpec for the current item
28     And I want to check property "status" for value "Deleted"
29
30   Scenario: Get with invalid Id
31     Then I want to set property "item.id" to value "invalidId"
32     Then I want the following to fail with error message "No Activity Spec found for the given identifiers"
33     And I want to get the ActivitySpec for the current item
34
35    #SDC-6353
36   Scenario: Create with duplicate name - invalid
37     Given I want to set property "duplicateName" with a random value
38     And I want to set the input data to file "resources/json/createActivitySpec.json"
39     And I want to update the input property "name" with value of property "duplicateName"
40     And I want to create an ActivitySpec
41     And I want to check property "id" exists
42     And I want to check property "versionId" exists
43
44     When I want to set the input data to file "resources/json/createActivitySpec.json"
45     And I want to update the input property "name" with value of property "duplicateName"
46     Then I want the following to fail with response status code 422
47     And I want to create an ActivitySpec
48
49    #SDC-6354
50   Scenario: Create with invalid name - invalid
51     Given I want to set the input data to file "resources/json/createActivitySpec.json"
52     And I want to update the input property "name" with value "test!@"
53     Then I want the following to fail with response status code 400
54     When I want to create an ActivitySpec
55
56    #SDC-6355
57   Scenario: Create with null/blank name - invalid
58     Given I want to set the input data to file "resources/json/createActivitySpec.json"
59     And I want to update the input property "name" with value ""
60     Then I want the following to fail with response status code 400
61     When I want to create an ActivitySpec