File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -57,4 +57,18 @@ public function iListAllCustomFields()
5757 $ api ->getLastResponse (),
5858 );
5959 }
60+
61+ /**
62+ * @When I list all custom field names
63+ */
64+ public function iListAllCustomFieldNames ()
65+ {
66+ /** @var CustomField */
67+ $ api = $ this ->getNativeCurlClient ()->getApi ('custom_fields ' );
68+
69+ $ this ->registerClientResponse (
70+ $ api ->listNames (),
71+ $ api ->getLastResponse (),
72+ );
73+ }
6074}
Original file line number Diff line number Diff line change @@ -101,3 +101,17 @@ Feature: Interacting with the REST API for custom fields
101101 | visible | true |
102102 | trackers | [] |
103103 | roles | [] |
104+
105+ Scenario : Listing of multiple custom field names
106+ Given I have a "NativeCurlClient" client
107+ And I create a custom field for issues with the name "Note B"
108+ And I create a custom field for issues with the name "Note A"
109+ When I list all custom field names
110+ Then the response has the status code "200"
111+ And the response has the content type "application/json"
112+ And the returned data is an array
113+ And the returned data contains "2" items
114+ And the returned data contains the following data
115+ | property | value |
116+ | 1 | Note B |
117+ | 2 | Note A |
You can’t perform that action at this time.
0 commit comments