diff --git a/src/dms/tests/EdFi.DataManagementService.Tests.E2E/Features/ResourceQueries/ExperimentalQueries.feature.disabled b/src/dms/tests/EdFi.DataManagementService.Tests.E2E/Features/ResourceQueries/ExperimentalQueries.feature.disabled index 6e79f09b0..75dff1d79 100644 --- a/src/dms/tests/EdFi.DataManagementService.Tests.E2E/Features/ResourceQueries/ExperimentalQueries.feature.disabled +++ b/src/dms/tests/EdFi.DataManagementService.Tests.E2E/Features/ResourceQueries/ExperimentalQueries.feature.disabled @@ -31,7 +31,7 @@ Feature: Experimental / proposed features for enhanced paging And the response body should match the most recently inserted school @API-258 @ignore - Scenario: 03 Ensure that clients can perform a DESCending sort by an attribute + Scenario: 02 Ensure that clients can perform a DESCending sort by an attribute When a GET request is made to "/ed-fi/schools?orderBy=schoolId&direction=desc" Then it should respond with 200 And the response body is @@ -87,7 +87,7 @@ Feature: Experimental / proposed features for enhanced paging """ @API-258 @ignore - Scenario: 04 Ensure that clients can perform an ASCending sort by an attribute + Scenario: 03 Ensure that clients can perform an ASCending sort by an attribute When a GET request is made to "/ed-fi/schools?orderBy=schoolId&direction=asc" Then it should respond with 200 And the response body is diff --git a/src/dms/tests/EdFi.DataManagementService.Tests.E2E/Features/Resources/etag.feature.disabled b/src/dms/tests/EdFi.DataManagementService.Tests.E2E/Features/Resources/etag.feature.disabled new file mode 100644 index 000000000..8c4c96501 --- /dev/null +++ b/src/dms/tests/EdFi.DataManagementService.Tests.E2E/Features/Resources/etag.feature.disabled @@ -0,0 +1,67 @@ +Feature: Validates the functionality of the ETag + + Background: + + Given the system has these "students" + | studentUniqueId | birthDate | firstName | lastSurname | + | 111111 | 2014-08-14 | Russella | Mayers | + + @API-260 + Scenario: 01 Ensure that clients can retrieve an ETag in the response header + When a GET request is made to "/ed-fi/students/{id}" + Then it should respond with 200 + And the response body is + """ + { + "studentUniqueId": "111111", + "birthDate": "2014-08-14", + "firstName": "Russella", + "lastSurname": "Mayers", + "_etag": "{etag}" + } + """ + And the ETag is in the response header + + @API-261 + Scenario: 02 Ensure that clients can pass an ETag in the request header + When a PUT if-match "{etag}" request is made to "/ed-fi/students/{id}" with + """ + { + "studentUniqueId": "111111", + "birthDate": "2014-08-14", + "firstName": "Russella", + "lastSurname": "Mayorga" + } + """ + Then it should respond with 204 + + @API-262 + Scenario: 03 Ensure that clients cannot pass a different ETag in the If-Match header + When a PUT if-match "0000000000" request is made to "/ed-fi/students/{id}" with + """ + { + "studentUniqueId": "111111", + "birthDate": "2014-08-14", + "firstName": "Russella", + "lastSurname": "Mulligan" + } + """ + Then it should respond with 412 + And the response body is + """ + { + "detail": "The item has been modified by another user.", + "type": "urn:ed-fi:api:optimistic-lock-failed", + "title": "Optimistic Lock Failed", + "status": 412, + "correlationId": null, + "errors": [ + "The resource item's etag value does not match what was specified in the 'If-Match' request header indicating that it has been modified by another client since it was last retrieved." + ] + } + """ + + + + +