1 # Copyright © 2018 European Support Limited
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 Feature: Archive Workflow
17 Scenario: Archive workflow
18 Given I want to create a Workflow
19 When I want to create input data
20 And I want to update the input property "status" with value "ARCHIVED"
21 And I want to create for path "/workflows/{item.id}/archiving" with the input data from the context
22 Then I want to get path "/workflows/{item.id}"
23 And I want to check property "status" for value "ARCHIVED"
24 When I want to get path "/workflows?limit=2000&statusFilter=ARCHIVED"
25 Then I want to check in the list "items" property "id" with value "{item.id}" exists
26 When I want to get path "/workflows?limit=2000&"
27 Then I want to check in the list "items" property "id" with value "{item.id}" does not exist
30 Scenario: Archive and then Restore workflow
31 Given I want to create a Workflow
32 When I want to create input data
33 And I want to update the input property "status" with value "ARCHIVED"
34 And I want to create for path "/workflows/{item.id}/archiving" with the input data from the context
35 Then I want to get path "/workflows/{item.id}"
36 And I want to check property "status" for value "ARCHIVED"
37 When I want to get path "/workflows?limit=2000&statusFilter=ARCHIVED"
38 Then I want to check in the list "items" property "id" with value "{item.id}" exists
39 When I want to get path "/workflows?limit=2000&"
40 Then I want to check in the list "items" property "id" with value "{item.id}" does not exist
41 And I want to update the input property "status" with value "ACTIVE"
42 And I want to create for path "/workflows/{item.id}/archiving" with the input data from the context
43 Then I want to get path "/workflows/{item.id}"
44 And I want to check property "status" for value "ACTIVE"
45 When I want to get path "/workflows?limit=2000&statusFilter=ARCHIVED"
46 Then I want to check in the list "items" property "id" with value "{item.id}" does not exist
47 When I want to get path "/workflows?limit=2000&"
48 Then I want to check in the list "items" property "id" with value "{item.id}" exists
50 Scenario: Archive already archived workflow
51 Given I want to create a Workflow
52 When I want to create input data
53 And I want to update the input property "status" with value "ARCHIVED"
54 And I want to create for path "/workflows/{item.id}/archiving" with the input data from the context
55 When I want to create input data
56 And I want to update the input property "status" with value "ARCHIVED"
57 Then I want the following to fail with response status code 422
58 And I want to create for path "/workflows/{item.id}/archiving" with the input data from the context
60 Scenario: Restore already active workflow
61 Given I want to create a Workflow
62 When I want to create input data
63 And I want to update the input property "status" with value "ACTIVE"
64 Then I want the following to fail with response status code 422
65 And I want to create for path "/workflows/{item.id}/archiving" with the input data from the context