[tests-only] removing the setresponse in given/when/then step in webdavproperties context (#7368)

* refactor given and when steps in webdavproperties context

* change the status code in tests as the when step sets the response now

* correct the status code check

* only save response

* use getResponseXml to get xml response object

* fix isEtagValid method

* rename step def methods

* make stricter checks

---------

Co-authored-by: Saw-jan <saw.jan.grg3e@gmail.com>
This commit is contained in:
Karun Atreya
2023-10-05 09:55:11 +05:45
committed by GitHub
co-authored by Saw-jan
parent 6fb05986ed
commit b0455f03e6
7 changed files with 236 additions and 288 deletions
@@ -17,7 +17,7 @@ Feature: sharing
When user "Alice" gets the following properties of file "/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "201"
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "19"
Examples:
| dav-path-version |
@@ -38,7 +38,7 @@ Feature: sharing
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "19"
Examples:
| dav-path-version |
@@ -60,7 +60,7 @@ Feature: sharing
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "19"
Examples:
| dav-path-version |
@@ -97,7 +97,7 @@ Feature: sharing
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "3"
Examples:
| dav-path-version |
@@ -134,7 +134,7 @@ Feature: sharing
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "17"
Examples:
| dav-path-version |
@@ -148,7 +148,7 @@ Feature: sharing
When user "Alice" gets the following properties of folder "/" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "201"
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "31"
Examples:
| dav-path-version |
@@ -169,7 +169,7 @@ Feature: sharing
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "31"
Examples:
| dav-path-version |
@@ -190,7 +190,7 @@ Feature: sharing
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "31"
Examples:
| dav-path-version |
@@ -227,7 +227,7 @@ Feature: sharing
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "29"
Examples:
| dav-path-version |
@@ -264,7 +264,7 @@ Feature: sharing
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "27"
Examples:
| dav-path-version |
@@ -301,7 +301,7 @@ Feature: sharing
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "23"
Examples:
| dav-path-version |
@@ -338,7 +338,7 @@ Feature: sharing
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "15"
Examples:
| dav-path-version |