stable
Clone or download
route Part of story #19730 manage steps in REST API: POST /artifacts How to test: - Via the explorer submit a new artifact which contains the Step Defintion field. => The artifact is created with the fields - Try to edit an artifact with the Step Definition field => The artifact is updated but the Step Definition is still the same before update To submit a new artifact you may use the following templates: 1.Template by field id values: { "tracker": { "id": <tracker_id> }, "values": [ { "field_id": <step_def_id>, "value": [ { "description": "descirption 1", "description_format": "html", "expected_results": "result1 from rest api", "expected_results_format": "html" }, { "description": "descirption test api 2", "description_format": "commonmark", "expected_results": "result from rest api 2", "expected_results_format": "commonmark" } ] } ] } 2.Template by field name values: { "tracker": { "id": 13 }, "values_by_field": { "<field_name>": { "value": "my value" }, "<step_def_field_name>": { "value": [ { "description": "descirption test api", "description_format": "html", "expected_results": "result from rest api", "expected_results_format": "html" }, { "description": "descirption test api 2", "description_format": "commonmark", "expected_results": "result from rest api 2", "expected_results_format": "commonmark" } ] } } } Change-Id: I79a629c1b2d116a22d6e480b8899087a407ada9c
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/testmanagement/include/TestManagement/Step/Definition/Field/StepDefinition.php | +37 | −13 | Go to diff View file |
A | plugins/testmanagement/include/TestManagement/Step/Definition/Field/StepDefinitionDataConverter.php | +49 | −0 | Go to diff View file |
A | plugins/testmanagement/include/TestManagement/Step/StepChecker.php | +64 | −0 | Go to diff View file |
A | plugins/testmanagement/tests/rest/TestManagement/ArtifactsTest.php | +144 | −0 | Go to diff View file |
M | plugins/testmanagement/tests/rest/TestManagement/BaseTest.php | +0 | −1 | Go to diff View file |
M | plugins/testmanagement/tests/rest/TestManagement/DefinitionsTest.php | +0 | −17 | Go to diff View file |
M | plugins/testmanagement/tests/rest/TestManagement/ExecutionsTest.php | +0 | −1 | Go to diff View file |
M | plugins/testmanagement/tests/rest/TestManagement/ProjectTest.php | +2 | −2 | Go to diff View file |
A | plugins/testmanagement/tests/rest/TestManagement/UsedFieldIdNotFoundException.php | +29 | −0 | Go to diff View file |
M | plugins/testmanagement/tests/rest/TestManagementDataBuilder.php | +6 | −3 | Go to diff View file |
M | plugins/testmanagement/tests/rest/init_test_data.php | +3 | −0 | Go to diff View file |
A | plugins/testmanagement/tests/unit/TestManagement/Step/Definition/Field/StepDefinitionDataConverterTest.php | +66 | −0 | Go to diff View file |
M | plugins/testmanagement/tests/unit/TestManagement/Step/Definition/Field/StepDefinitionTest.php | +163 | −95 | Go to diff View file |
A | plugins/testmanagement/tests/unit/TestManagement/Step/StepCheckerTest.php | +141 | −0 | Go to diff View file |