|
| 1 | +@issue_status |
| 2 | +Feature: Interacting with the REST API for issue statuses |
| 3 | + In order to interact with REST API for issue statuses |
| 4 | + As a user |
| 5 | + I want to make sure the Redmine server replies with the correct response |
| 6 | + |
| 7 | + Scenario: Listing of zero issue statuses |
| 8 | + Given I have a "NativeCurlClient" client |
| 9 | + When I list all issue statuses |
| 10 | + Then the response has the status code "200" |
| 11 | + And the response has the content type "application/json" |
| 12 | + And the returned data has only the following properties |
| 13 | + """ |
| 14 | + issue_statuses |
| 15 | + """ |
| 16 | + And the returned data "issue_statuses" property is an array |
| 17 | + And the returned data "issue_statuses" property contains "0" items |
| 18 | + |
| 19 | + Scenario: Listing of multiple issue statuses |
| 20 | + Given I have a "NativeCurlClient" client |
| 21 | + And I have an issue status with the name "New" |
| 22 | + And I have an issue status with the name "Done" |
| 23 | + When I list all issue statuses |
| 24 | + Then the response has the status code "200" |
| 25 | + And the response has the content type "application/json" |
| 26 | + And the returned data has only the following properties |
| 27 | + """ |
| 28 | + issue_statuses |
| 29 | + """ |
| 30 | + And the returned data "issue_statuses" property is an array |
| 31 | + And the returned data "issue_statuses" property contains "2" items |
| 32 | + # field 'description' was added in Redmine 5.1.0, see https://www.redmine.org/issues/2568 |
| 33 | + And the returned data "issue_statuses.0" property contains the following data with Redmine version ">= 5.1.0" |
| 34 | + | property | value | |
| 35 | + | id | 1 | |
| 36 | + | name | New | |
| 37 | + | is_closed | false | |
| 38 | + | description | null | |
| 39 | + But the returned data "issue_statuses.0" property contains the following data with Redmine version "< 5.1.0" |
| 40 | + | property | value | |
| 41 | + | id | 1 | |
| 42 | + | name | New | |
| 43 | + | is_closed | false | |
| 44 | + # field 'description' was added in Redmine 5.1.0, see https://www.redmine.org/issues/2568 |
| 45 | + And the returned data "issue_statuses.1" property contains the following data with Redmine version ">= 5.1.0" |
| 46 | + | property | value | |
| 47 | + | id | 2 | |
| 48 | + | name | Done | |
| 49 | + | is_closed | false | |
| 50 | + | description | null | |
| 51 | + But the returned data "issue_statuses.1" property contains the following data with Redmine version "< 5.1.0" |
| 52 | + | property | value | |
| 53 | + | id | 2 | |
| 54 | + | name | Done | |
| 55 | + | is_closed | false | |
| 56 | + |
| 57 | + Scenario: Listing of multiple issue status names |
| 58 | + Given I have a "NativeCurlClient" client |
| 59 | + And I have an issue status with the name "New" |
| 60 | + And I have an issue status with the name "Done" |
| 61 | + When I list all issue status names |
| 62 | + Then the response has the status code "200" |
| 63 | + And the response has the content type "application/json" |
| 64 | + And the returned data is an array |
| 65 | + And the returned data contains "2" items |
| 66 | + And the returned data contains the following data |
| 67 | + | property | value | |
| 68 | + | 1 | New | |
| 69 | + | 2 | Done | |
0 commit comments