[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 17:07:33 +05:45
committed by Sawjan Gurung
co-authored by Saw-jan
parent f2f3f546b4
commit 9cee6bcbcd
7 changed files with 236 additions and 288 deletions
@@ -19,7 +19,7 @@ Feature: sharing
When user "Brian" gets the following properties of file "/tmp.txt" inside space "Shares" 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"
@@ -36,7 +36,7 @@ Feature: sharing
When user "Brian" gets the following properties of file "/tmp.txt" inside space "Shares" 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"
@@ -63,7 +63,7 @@ Feature: sharing
When user "Brian" gets the following properties of file "/tmp.txt" inside space "Shares" 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"
@@ -90,7 +90,7 @@ Feature: sharing
When user "Brian" gets the following properties of file "/tmp.txt" inside space "Shares" 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"
@@ -101,7 +101,7 @@ Feature: sharing
When user "Brian" gets the following properties of folder "/tmp" inside space "Shares" 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"
@@ -117,7 +117,7 @@ Feature: sharing
When user "Brian" gets the following properties of folder "/tmp" inside space "Shares" 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"
@@ -144,7 +144,7 @@ Feature: sharing
When user "Brian" gets the following properties of folder "/tmp" inside space "Shares" 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"
@@ -171,7 +171,7 @@ Feature: sharing
When user "Brian" gets the following properties of folder "/tmp" inside space "Shares" 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"
@@ -198,7 +198,7 @@ Feature: sharing
When user "Brian" gets the following properties of folder "/tmp" inside space "Shares" 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"
@@ -225,7 +225,7 @@ Feature: sharing
When user "Brian" gets the following properties of folder "/tmp" inside space "Shares" 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"