Skip to content

Commit

Permalink
Merge pull request #5459 from owncloud/refactor-step
Browse files Browse the repository at this point in the history
[tests-only] Refactored confusing step definition
  • Loading branch information
phil-davis authored Jul 6, 2021
2 parents 2dedce1 + df80890 commit c53852d
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ Feature: Federation Sharing - sharing with users on other cloud storages
And the user reloads the current page of the webUI
And the user opens folder "Shares" using the webUI
Then file "lorem.txt" should be listed on the webUI
And as "Alice" the content of "Shares/lorem.txt" should be the same as the local "lorem.txt"
And as "Alice" the content of "Shares/lorem.txt" should be the same as the content of local file "lorem.txt"
And folder "simple-folder" should be listed on the webUI
And the user opens folder "simple-folder" using the webUI
And file "lorem.txt" should be listed on the webUI
And as "Alice" the content of "Shares/simple-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Alice" the content of "Shares/simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"
# When the user browses to the shared-with-me page
# Then file "Shares/lorem.txt" should be listed on the webUI
# And folder "Shares/simple-folder" should be listed on the webUI
Expand Down Expand Up @@ -112,7 +112,7 @@ Feature: Federation Sharing - sharing with users on other cloud storages
And the user opens folder "Shares" using the webUI
And the user opens folder "simple-folder" using the webUI
And the user uploads overwriting file "lorem.txt" using the webUI
Then as "Alice" the content of "Shares/simple-folder/lorem.txt" should be the same as the local "lorem.txt"
Then as "Alice" the content of "Shares/simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"

@issue-3309
Scenario: upload a new file in a received share - remote server shares - local server receives
Expand Down Expand Up @@ -247,8 +247,8 @@ Feature: Federation Sharing - sharing with users on other cloud storages
| lorem.txt |
When the user downloads file "lorem.txt" using the webUI
Then no message should be displayed on the webUI
And as "Alice" the content of "Shares/'single'quotes/lorem.txt" should be the same as the local "lorem.txt"
And as "Alice" the content of "Shares/'single'quotes/simple-empty-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Alice" the content of "Shares/'single'quotes/lorem.txt" should be the same as the content of local file "lorem.txt"
And as "Alice" the content of "Shares/'single'quotes/simple-empty-folder/lorem.txt" should be the same as the content of local file "lorem.txt"


Scenario: uploading a file inside a folder of a folder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ Feature: Federation Sharing - sharing with users on other cloud storages
When the user accepts all shares displayed in the notifications on the webUI
And the user reloads the current page of the webUI
Then file "lorem.txt" should be listed on the webUI
And as "Alice" the content of "lorem.txt" should be the same as the local "lorem.txt"
And as "Alice" the content of "lorem.txt" should be the same as the content of local file "lorem.txt"
And folder "simple-folder" should be listed on the webUI
When the user opens folder "simple-folder" using the webUI
Then file "lorem.txt" should be listed on the webUI
And as "Alice" the content of "simple-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Alice" the content of "simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"
# When the user browses to the shared-with-me page
# Then file "lorem.txt" should be listed on the webUI
# And folder "simple-folder" should be listed on the webUI
Expand Down Expand Up @@ -116,7 +116,7 @@ Feature: Federation Sharing - sharing with users on other cloud storages
And the user reloads the current page of the webUI
And the user opens folder "simple-folder" using the webUI
When the user uploads overwriting file "lorem.txt" using the webUI
Then as "Alice" the content of "simple-folder/lorem.txt" should be the same as the local "lorem.txt"
Then as "Alice" the content of "simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"

@issue-3309
Scenario: upload a new file in a received share - remote server shares - local server receives
Expand Down Expand Up @@ -241,8 +241,8 @@ Feature: Federation Sharing - sharing with users on other cloud storages
| lorem.txt |
When the user downloads file "lorem.txt" using the webUI
Then no message should be displayed on the webUI
And as "Alice" the content of "'single'quotes/lorem.txt" should be the same as the local "lorem.txt"
And as "Alice" the content of "'single'quotes/simple-empty-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Alice" the content of "'single'quotes/lorem.txt" should be the same as the content of local file "lorem.txt"
And as "Alice" the content of "'single'quotes/simple-empty-folder/lorem.txt" should be the same as the content of local file "lorem.txt"


Scenario: uploading a file inside a folder of a folder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,19 @@ Feature: Sharing files and folders with internal groups
And user "Alice" accepts the share "new-lorem.txt" offered by user "Carol" using the sharing API
And user "Brian" accepts the share "new-lorem.txt" offered by user "Carol" using the sharing API
And the user re-logs in as "Alice" using the webUI
Then as "Alice" the content of "/Shares/new-lorem.txt" should not be the same as the local "new-lorem.txt"
Then as "Alice" the content of "/Shares/new-lorem.txt" should not be the same as the content of local file "new-lorem.txt"
# overwrite the received shared file
When the user opens folder "Shares" using the webUI
And the user uploads overwriting file "new-lorem.txt" using the webUI
Then file "new-lorem.txt" should be listed on the webUI
And as "Alice" the content of "/Shares/new-lorem.txt" should be the same as the local "new-lorem.txt"
And as "Alice" the content of "/Shares/new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
# unshare the received shared file
When the user deletes file "new-lorem.txt" using the webUI
Then file "new-lorem.txt" should not be listed on the webUI
# check that another group member can still see the file
And as "Brian" the content of "/Shares/new-lorem.txt" should be the same as the local "new-lorem.txt"
And as "Brian" the content of "/Shares/new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
# check that the original file owner can still see the file
And as "Carol" the content of "new-lorem.txt" should be the same as the local "new-lorem.txt"
And as "Carol" the content of "new-lorem.txt" should be the same as the content of local file "new-lorem.txt"

@issue-ocis-1943
Scenario: share a folder with an internal group and a member uploads, overwrites and deletes files
Expand All @@ -109,29 +109,29 @@ Feature: Sharing files and folders with internal groups
And the user re-logs in as "Alice" using the webUI
And the user opens folder "Shares" using the webUI
And the user opens folder "new-simple-folder" using the webUI
Then as "Alice" the content of "/Shares/new-simple-folder/lorem.txt" should not be the same as the local "lorem.txt"
Then as "Alice" the content of "/Shares/new-simple-folder/lorem.txt" should not be the same as the content of local file "lorem.txt"
# overwrite an existing file in the received share
When the user uploads overwriting file "lorem.txt" using the webUI
Then file "lorem.txt" should be listed on the webUI
And as "Alice" the content of "/Shares/new-simple-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Alice" the content of "/Shares/new-simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"
# upload a new file into the received share
When the user uploads file "new-lorem.txt" using the webUI
Then as "Alice" the content of "/Shares/new-simple-folder/new-lorem.txt" should be the same as the local "new-lorem.txt"
Then as "Alice" the content of "/Shares/new-simple-folder/new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
# delete a file in the received share
When the user deletes file "data.zip" using the webUI
Then file "data.zip" should not be listed on the webUI
# check that the file actions by the sharee are visible to another group member
When the user re-logs in as "Brian" using the webUI
And the user opens folder "Shares" using the webUI
And the user opens folder "new-simple-folder" using the webUI
Then as "Brian" the content of "/Shares/new-simple-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Brian" the content of "/Shares/new-simple-folder/new-lorem.txt" should be the same as the local "new-lorem.txt"
Then as "Brian" the content of "/Shares/new-simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"
And as "Brian" the content of "/Shares/new-simple-folder/new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
And file "data.zip" should not be listed on the webUI
# check that the file actions by the sharee are visible for the share owner
When the user re-logs in as "Carol" using the webUI
And the user opens folder "new-simple-folder" using the webUI
Then as "Carol" the content of "new-simple-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Carol" the content of "new-simple-folder/new-lorem.txt" should be the same as the local "new-lorem.txt"
Then as "Carol" the content of "new-simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"
And as "Carol" the content of "new-simple-folder/new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
And file "data.zip" should not be listed on the webUI

@skip @issue-4102
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,20 @@ Feature: Sharing files and folders with internal groups
And user "Carol" has logged in using the webUI
When the user shares file "new-lorem.txt" with group "grp1" as "Editor" using the webUI
And the user re-logs in as "Alice" using the webUI
Then as "Alice" the content of "new-lorem.txt" should not be the same as the local "new-lorem.txt"
Then as "Alice" the content of "new-lorem.txt" should not be the same as the content of local file "new-lorem.txt"
# overwrite the received shared file
When the user uploads overwriting file "new-lorem.txt" using the webUI
Then file "new-lorem.txt" should be listed on the webUI
And as "Alice" the content of "new-lorem.txt" should be the same as the local "new-lorem.txt"
And as "Alice" the content of "new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
# unshare the received shared file
When the user deletes file "new-lorem.txt" using the webUI
Then file "new-lorem.txt" should not be listed on the webUI
# check that another group member can still see the file
When the user re-logs in as "Brian" using the webUI
Then as "Brian" the content of "new-lorem.txt" should be the same as the local "new-lorem.txt"
Then as "Brian" the content of "new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
# check that the original file owner can still see the file
When the user re-logs in as "Carol" using the webUI
Then as "Carol" the content of "new-lorem.txt" should be the same as the local "new-lorem.txt"
Then as "Carol" the content of "new-lorem.txt" should be the same as the content of local file "new-lorem.txt"


Scenario: share a folder with an internal group and a member uploads, overwrites and deletes files
Expand All @@ -100,28 +100,28 @@ Feature: Sharing files and folders with internal groups
When the user shares folder "new-simple-folder" with group "grp1" as "Editor" using the webUI
And the user re-logs in as "Alice" using the webUI
And the user opens folder "new-simple-folder" using the webUI
Then as "Alice" the content of "new-simple-folder/lorem.txt" should not be the same as the local "lorem.txt"
Then as "Alice" the content of "new-simple-folder/lorem.txt" should not be the same as the content of local file "lorem.txt"
# overwrite an existing file in the received share
When the user uploads overwriting file "lorem.txt" using the webUI
Then file "lorem.txt" should be listed on the webUI
And as "Alice" the content of "new-simple-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Alice" the content of "new-simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"
# upload a new file into the received share
When the user uploads file "new-lorem.txt" using the webUI
Then as "Alice" the content of "new-simple-folder/new-lorem.txt" should be the same as the local "new-lorem.txt"
Then as "Alice" the content of "new-simple-folder/new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
# delete a file in the received share
When the user deletes file "data.zip" using the webUI
Then file "data.zip" should not be listed on the webUI
# check that the file actions by the sharee are visible to another group member
When the user re-logs in as "Brian" using the webUI
And the user opens folder "new-simple-folder" using the webUI
Then as "Brian" the content of "new-simple-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Brian" the content of "new-simple-folder/new-lorem.txt" should be the same as the local "new-lorem.txt"
Then as "Brian" the content of "new-simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"
And as "Brian" the content of "new-simple-folder/new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
And file "data.zip" should not be listed on the webUI
# check that the file actions by the sharee are visible for the share owner
When the user re-logs in as "Carol" using the webUI
And the user opens folder "new-simple-folder" using the webUI
Then as "Carol" the content of "new-simple-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Carol" the content of "new-simple-folder/new-lorem.txt" should be the same as the local "new-lorem.txt"
Then as "Carol" the content of "new-simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"
And as "Carol" the content of "new-simple-folder/new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
And file "data.zip" should not be listed on the webUI


Expand All @@ -139,13 +139,13 @@ Feature: Sharing files and folders with internal groups
Then folder "new-simple-folder" should be listed on the webUI
When the user opens folder "new-simple-folder" using the webUI
Then file "lorem.txt" should be listed on the webUI
And as "Brian" the content of "new-simple-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Brian" the content of "new-simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"
# check that the folder is still visible for the share owner
When the user re-logs in as "Carol" using the webUI
Then folder "new-simple-folder" should be listed on the webUI
When the user opens folder "new-simple-folder" using the webUI
Then file "lorem.txt" should be listed on the webUI
And as "Carol" the content of "new-simple-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Carol" the content of "new-simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"


Scenario: user shares the file/folder with a group and delete the share with group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ Feature: Sharing files and folders with internal users
And user "Alice" has accepted the share "new-lorem.txt" offered by user "Brian"
When the user re-logs in as "Alice" using the webUI
And the user opens folder "Shares" using the webUI
Then as "Alice" the content of "Shares/new-lorem.txt" should not be the same as the local "new-lorem.txt"
Then as "Alice" the content of "Shares/new-lorem.txt" should not be the same as the content of local file "new-lorem.txt"
# overwrite the received shared file
When the user uploads overwriting file "new-lorem.txt" using the webUI
Then file "new-lorem.txt" should be listed on the webUI
And as "Alice" the content of "Shares/new-lorem.txt" should be the same as the local "new-lorem.txt"
And as "Alice" the content of "Shares/new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
# unshare the received shared file
When the user deletes file "new-lorem.txt" using the webUI
Then file "new-lorem.txt" should not be listed on the webUI
# check that the original file owner can still see the file
And as "Brian" the content of "new-lorem.txt" should be the same as the local "new-lorem.txt"
And as "Brian" the content of "new-lorem.txt" should be the same as the content of local file "new-lorem.txt"


Scenario: share a folder with another internal user who uploads, overwrites and deletes files
Expand All @@ -84,24 +84,24 @@ Feature: Sharing files and folders with internal users
And the user re-logs in as "Alice" using the webUI
And the user browses to the folder "Shares" on the files page
And the user opens folder "simple-folder" using the webUI
Then as "Alice" the content of "Shares/simple-folder/lorem.txt" should not be the same as the local "lorem.txt"
Then as "Alice" the content of "Shares/simple-folder/lorem.txt" should not be the same as the content of local file "lorem.txt"
# overwrite an existing file in the received share
When the user uploads overwriting file "lorem.txt" using the webUI
Then file "lorem.txt" should be listed on the webUI
And as "Alice" the content of "Shares/simple-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Alice" the content of "Shares/simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"
# upload a new file into the received share
When the user uploads file "new-lorem.txt" using the webUI
Then as "Alice" the content of "Shares/simple-folder/new-lorem.txt" should be the same as the local "new-lorem.txt"
Then as "Alice" the content of "Shares/simple-folder/new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
# delete a file in the received share
When the user deletes file "data.zip" using the webUI
Then file "data.zip" should not be listed on the webUI
# check that the file actions by the sharee are visible for the share owner
When the user re-logs in as "Brian" using the webUI
And the user opens folder "simple-folder" using the webUI
Then file "lorem.txt" should be listed on the webUI
And as "Brian" the content of "simple-folder/lorem.txt" should be the same as the local "lorem.txt"
And as "Brian" the content of "simple-folder/lorem.txt" should be the same as the content of local file "lorem.txt"
And file "new-lorem.txt" should be listed on the webUI
And as "Brian" the content of "simple-folder/new-lorem.txt" should be the same as the local "new-lorem.txt"
And as "Brian" the content of "simple-folder/new-lorem.txt" should be the same as the content of local file "new-lorem.txt"
But file "data.zip" should not be listed on the webUI

@issue-product-270
Expand Down
Loading

0 comments on commit c53852d

Please sign in to comment.