Skip to content

Commit

Permalink
refactor given/when/then steps in spaces context (#7506)
Browse files Browse the repository at this point in the history
pass the returned response without setting in then step

added the missing when step whose response is checked by the then step

addressed the reviews

changed from decoded body to docoded response
  • Loading branch information
KarunAtreya authored Oct 17, 2023
1 parent 97b3621 commit f63d9cf
Show file tree
Hide file tree
Showing 3 changed files with 437 additions and 194 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Feature: Email notification
And user "Brian" has switched the system language to "es"
And user "Carol" has switched the system language to "de"
And user "Alice" has created a space "new-space" with the default quota using the GraphApi
When user "Alice" has shared a space "new-space" with settings:
When user "Alice" shares a space "new-space" with settings:
| shareWith | group1 |
| role | viewer |
Then the HTTP status code should be "200"
Expand Down
3 changes: 2 additions & 1 deletion tests/acceptance/features/apiSpaces/changeSpaces.feature
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ Feature: Change data of space
When user "<user>" uploads a file inside space "Project Jupiter" owned by the user "Alice" with content "new content" to ".space/readme.md" using the WebDAV API
Then the HTTP status code should be "<code>"
And for user "<user>" the content of the file ".space/readme.md" of the space "Project Jupiter" should be "<expectedContent>"
When user "<user>" lists all available spaces via the GraphApi
And the JSON response should contain space called "Project Jupiter" owned by "Alice" with description file ".space/readme.md" and match
"""
{
Expand Down Expand Up @@ -422,7 +423,7 @@ Feature: Change data of space
Given user "Alice" has created a folder ".space" in space "Project Jupiter"
And user "Alice" has uploaded a file inside space "Project Jupiter" with content "" to ".space/spaceImage.jpeg"
And user "Alice" has set the file ".space/spaceImage.jpeg" as a space image in a special section of the "Project Jupiter" space
When user "<user>" has uploaded a file inside space "Project Jupiter" with content "" to ".space/newSpaceImage.png"
When user "<user>" uploads a file inside space "Project Jupiter" with content "" to ".space/newSpaceImage.png" using the WebDAV API
And user "<user>" sets the file ".space/newSpaceImage.png" as a space image in a special section of the "Project Jupiter" space
Then the HTTP status code should be "200"
And the JSON response should contain space called "Project Jupiter" owned by "Alice" with description file ".space/newSpaceImage.png" and match
Expand Down
Loading

0 comments on commit f63d9cf

Please sign in to comment.