@@ -52,20 +52,6 @@ Feature: Interacting with the REST API for versions
5252 | id | 1 |
5353 | name | Test Project |
5454
55- Scenario : Updating a version
56- Given I have a "NativeCurlClient" client
57- And I create a project with name "Test Project" and identifier "test-project"
58- And I create a version with project identifier "test-project" with the following data
59- | property | value |
60- | name | Test -Version |
61- When I update the version with id "1" and the following data
62- | property | value |
63- | name | New Version name |
64- Then the response has the status code "204"
65- And the response has an empty content type
66- And the response has the content ""
67- And the returned data is exactly ""
68-
6955 Scenario : Showing a version
7056 Given I have a "NativeCurlClient" client
7157 And I create a project with name "Test Project" and identifier "test-project"
@@ -115,6 +101,99 @@ Feature: Interacting with the REST API for versions
115101 And the response has the content ""
116102 And the returned data is false
117103
104+ Scenario : Listing of zero versions
105+ Given I have a "NativeCurlClient" client
106+ And I create a project with name "Test Project" and identifier "test-project"
107+ When I list all versions for project identifier "test-project"
108+ Then the response has the status code "200"
109+ And the response has the content type "application/json"
110+ And the returned data has only the following properties
111+ """
112+ versions
113+ total_count
114+ """
115+ And the returned data contains the following data
116+ | property | value |
117+ | versions | [] |
118+ | total_count | 0 |
119+
120+ Scenario : Listing of multiple versions
121+ Given I have a "NativeCurlClient" client
122+ And I create a project with name "Test Project" and identifier "test-project"
123+ And I create a version with name "Test-Version B" and project identifier "test-project"
124+ And I create a version with name "Test-Version A" and project identifier "test-project"
125+ When I list all versions for project identifier "test-project"
126+ Then the response has the status code "200"
127+ And the response has the content type "application/json"
128+ And the returned data has only the following properties
129+ """
130+ versions
131+ total_count
132+ """
133+ And the returned data contains the following data
134+ | property | value |
135+ | total_count | 2 |
136+ And the returned data "versions" property is an array
137+ And the returned data "versions" property contains "2" items
138+ And the returned data "versions.0" property is an array
139+ And the returned data "versions.0" property has only the following properties
140+ """
141+ id
142+ project
143+ name
144+ description
145+ status
146+ due_date
147+ sharing
148+ wiki_page_title
149+ created_on
150+ updated_on
151+ """
152+ And the returned data "versions.0" property contains the following data
153+ | property | value |
154+ | id | 1 |
155+ | name | Test -Version B |
156+ | description | |
157+ | status | open |
158+ | sharing | none |
159+ | wiki_page_title | null |
160+ And the returned data "versions.0.project" property contains the following data
161+ | property | value |
162+ | id | 1 |
163+ | name | Test Project |
164+
165+ @wip
166+ Scenario : Listing of multiple version names
167+ Given I have a "NativeCurlClient" client
168+ And I create a project with name "Test Project 1" and identifier "test-project-1"
169+ And I create a project with name "Test Project 2" and identifier "test-project-2"
170+ And I create a version with name "Test-Version 1B" and project identifier "test-project-1"
171+ And I create a version with name "Test-Version 1A" and project identifier "test-project-1"
172+ And I create a version with name "Test-Version 2B" and project identifier "test-project-2"
173+ And I create a version with name "Test-Version 2A" and project identifier "test-project-2"
174+ When I list all version names for project identifier "test-project-2"
175+ Then the response has the status code "200"
176+ And the response has the content type "application/json"
177+ And the returned data contains "2" items
178+ And the returned data contains the following data
179+ | property | value |
180+ | 3 | Test -Version 2B |
181+ | 4 | Test -Version 2A |
182+
183+ Scenario : Updating a version
184+ Given I have a "NativeCurlClient" client
185+ And I create a project with name "Test Project" and identifier "test-project"
186+ And I create a version with project identifier "test-project" with the following data
187+ | property | value |
188+ | name | Test -Version |
189+ When I update the version with id "1" and the following data
190+ | property | value |
191+ | name | New Version name |
192+ Then the response has the status code "204"
193+ And the response has an empty content type
194+ And the response has the content ""
195+ And the returned data is exactly ""
196+
118197 Scenario : Removing a version
119198 Given I have a "NativeCurlClient" client
120199 And I create a project with name "Test Project" and identifier "test-project"
0 commit comments