Skip to content

Commit

Permalink
[test-only]e2e test. create link with role (#10335)
Browse files Browse the repository at this point in the history
* create link with role

* fix

* fix language test
  • Loading branch information
ScharfViktor authored Jan 16, 2024
1 parent e51fcba commit dbe2e32
Show file tree
Hide file tree
Showing 12 changed files with 142 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ Feature: Integrate with online office suites like Collabora and OnlyOffice
When "Alice" creates the following resources
| resource | type | content |
| OpenDocument.odt | OpenDocument | OpenDocument Content |
And "Alice" creates a public link for the resource "OpenDocument.odt" with password "%public%" using the sidebar panel
And "Alice" edits the public link named "Link" of resource "OpenDocument.odt" changing role to "Can edit"
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | role | password |
| OpenDocument.odt | Can edit | %public% |
And "Alice" logs out
And "Anonymous" opens the public link "Link"
And "Anonymous" unlocks the public link with password "%public%"
Expand All @@ -28,8 +29,9 @@ Feature: Integrate with online office suites like Collabora and OnlyOffice
When "Alice" creates the following resources
| resource | type | content |
| MicrosoftWord.docx | Microsoft Word | Microsoft Word Content |
And "Alice" creates a public link for the resource "MicrosoftWord.docx" with password "%public%" using the sidebar panel
And "Alice" edits the public link named "Link" of resource "MicrosoftWord.docx" changing role to "Can edit"
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | role | password |
| MicrosoftWord.docx | Can edit | %public% |
And "Alice" logs out
And "Anonymous" opens the public link "Link"
And "Anonymous" unlocks the public link with password "%public%"
Expand Down
4 changes: 3 additions & 1 deletion tests/e2e/cucumber/features/smoke/internalLink.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ Feature: internal link share
| resource | recipient | type | role |
| myfolder | Brian | user | Can edit |
And "Alice" opens the "files" app
And "Alice" creates a public link for the resource "myfolder" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| myfolder | %public% |
When "Alice" edits the public link named "Link" of resource "myfolder" changing role to "Invited people"
And "Brian" opens the public link "Link"
And "Brian" logs in from the internal link
Expand Down
22 changes: 12 additions & 10 deletions tests/e2e/cucumber/features/smoke/languageChange.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Feature: language settings
And "Brian" creates the following folder in personal space using API
| name |
| check_message |
And "Brian" opens the "files" app
And "Brian" shares the following resource using API
| resource | recipient | type | role |
| check_message | Alice | user | Can edit |
Expand All @@ -29,19 +28,22 @@ Feature: language settings
| Brian Murphy hat check_message mit Ihnen geteilt |
And "Alice" logs out


Scenario: anonymous user language change
When "Alice" logs in
And "Alice" creates the following folder in personal space using API
| name |
| folderPublic |
And "Alice" uploads the following local file into personal space using API
| localFile | to |
| filesForUpload/lorem.txt | lorem.txt |

And "Alice" opens the "files" app
And "Alice" creates the following resources
| resource | type |
| folderPublic | folder |
And "Alice" uploads the following resources
| resource | to |
| lorem.txt | folderPublic |
And "Alice" creates a public link for the resource "folderPublic" with password "%public%" using the sidebar panel
And "Alice" renames the most recently created public link of resource "folderPublic" to "myPublicLink"
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| folderPublic | %public% |
And "Alice" logs out
When "Anonymous" opens the public link "myPublicLink"
When "Anonymous" opens the public link "Link"
And "Anonymous" unlocks the public link with password "%public%"
And "Anonymous" opens the user menu
And "Anonymous" changes the language to "Deutsch - German"
Expand Down
84 changes: 51 additions & 33 deletions tests/e2e/cucumber/features/smoke/link.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ Feature: link

Scenario: public link
When "Alice" logs in
And "Alice" creates the following folders in personal space using API
| name |
| folderPublic |
And "Alice" creates the following files into personal space using API
| pathToFile | content |
| folderPublic/lorem.txt | lorem ipsum |

And "Alice" opens the "files" app
And "Alice" creates the following resources
| resource | type |
| folderPublic | folder |
And "Alice" uploads the following resources
| resource | to |
| lorem.txt | folderPublic |
And "Alice" creates a public link for the resource "folderPublic" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | role | password |
| folderPublic | Secret File Drop | %public% |
And "Alice" renames the most recently created public link of resource "folderPublic" to "myPublicLink"
And "Alice" edits the public link named "myPublicLink" of resource "folderPublic" changing role to "Secret File Drop"
And "Alice" sets the expiration date of the public link named "myPublicLink" of resource "folderPublic" to "+5 days"
Expand Down Expand Up @@ -55,6 +58,7 @@ Feature: link
And "Alice" creates the following files into personal space using API
| pathToFile | content |
| folderPublic/lorem.txt | lorem ipsum |

And "Alice" opens the "files" app
When "Alice" creates quick link of the resource "folderPublic" with password "%public%" from the context menu
And "Anonymous" opens the public link "Link"
Expand All @@ -70,31 +74,43 @@ Feature: link
| id |
| Brian |
And "Alice" logs in
And "Alice" creates the following resources
| resource | type |
| folderPublic | folder |
And "Alice" creates the following resources
| resource | type | content |
| folderPublic/shareToBrian.txt | txtFile | some text |
| folderPublic/shareToBrian.md | mdFile | readme |
And "Alice" uploads the following resources via drag-n-drop
| resource |
| simple.pdf |
| testavatar.jpg |
And "Alice" shares the following resources using the sidebar panel
And "Alice" creates the following folders in personal space using API
| name |
| folderPublic |
And "Alice" creates the following files into personal space using API
| pathToFile | content |
| folderPublic/shareToBrian.txt | some text |
| folderPublic/shareToBrian.md | readme |
And "Alice" uploads the following local file into personal space using API
| localFile | to |
| filesForUpload/simple.pdf | simple.pdf |
| filesForUpload/testavatar.jpg | testavatar.jpg |
And "Alice" shares the following resource using API
| resource | recipient | type | role |
| folderPublic | Brian | user | Can edit |
| simple.pdf | Brian | user | Can edit |
| testavatar.jpg | Brian | user | Can edit |
And "Alice" creates a public link for the resource "folderPublic" with password "%public%" using the sidebar panel

And "Alice" opens the "files" app
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| folderPublic | %public% |
And "Alice" renames the most recently created public link of resource "folderPublic" to "folderLink"
And "Alice" creates a public link for the resource "folderPublic/shareToBrian.txt" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| folderPublic/shareToBrian.txt | %public% |
And "Alice" renames the most recently created public link of resource "folderPublic/shareToBrian.txt" to "textLink"
And "Alice" creates a public link for the resource "folderPublic/shareToBrian.md" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| folderPublic/shareToBrian.md | %public% |
And "Alice" renames the most recently created public link of resource "folderPublic/shareToBrian.md" to "markdownLink"
And "Alice" creates a public link for the resource "simple.pdf" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| simple.pdf | %public% |
And "Alice" renames the most recently created public link of resource "simple.pdf" to "pdfLink"
And "Alice" creates a public link for the resource "testavatar.jpg" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| testavatar.jpg | %public% |
And "Alice" renames the most recently created public link of resource "testavatar.jpg" to "imageLink"
And "Alice" logs out
And "Brian" logs in
Expand Down Expand Up @@ -124,18 +140,21 @@ Feature: link

Scenario: add banned password for public link
When "Alice" logs in
And "Alice" uploads the following resources
| resource |
| lorem.txt |
And "Alice" creates a public link for the resource "lorem.txt" with password "%public%" using the sidebar panel
And "Alice" renames the most recently created public link of resource "lorem.txt" to "myPublicLink"
When "Alice" tries to sets a new password "ownCloud-1" of the public link named "myPublicLink" of resource "lorem.txt"
And "Alice" creates the following files into personal space using API
| pathToFile | content |
| lorem.txt | some text |

And "Alice" opens the "files" app
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| lorem.txt | %public% |
When "Alice" tries to sets a new password "ownCloud-1" of the public link named "Link" of resource "lorem.txt"
Then "Alice" should see an error message
"""
Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety
"""
And "Alice" closes the public link password dialog box
When "Alice" tries to sets a new password "ownCloud-1" of the public link named "myPublicLink" of resource "lorem.txt"
When "Alice" tries to sets a new password "ownCloud-1" of the public link named "Link" of resource "lorem.txt"
Then "Alice" should see an error message
"""
Unfortunately, your password is commonly used. please pick a harder-to-guess password for your safety
Expand All @@ -145,7 +164,6 @@ Feature: link
And "Alice" generates the password for the public link
And "Alice" copies the password of the public link
And "Alice" sets the password of the public link
And "Anonymous" opens the public link "myPublicLink"
And "Anonymous" opens the public link "Link"
And "Anonymous" unlocks the public link with password "%copied_password%"
And "Alice" logs out

8 changes: 4 additions & 4 deletions tests/e2e/cucumber/features/smoke/rename.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Feature: rename
And "Alice" shares the following resource using API
| resource | recipient | type | role |
| folder | Brian | user | Can edit |
And "Alice" creates a public link for the resource "folder" with password "%public%" using the sidebar panel
And "Alice" renames the most recently created public link of resource "folder" to "myPublicLink"
And "Alice" edits the public link named "myPublicLink" of resource "folder" changing role to "Can edit"
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | role | password |
| folder | Can edit | %public% |
And "Brian" logs in
And "Brian" opens the "files" app
And "Brian" navigates to the shared with me page
Expand All @@ -34,7 +34,7 @@ Feature: rename
And "Brian" logs out

# rename in the public link
When "Anonymous" opens the public link "myPublicLink"
When "Anonymous" opens the public link "Link"
And "Anonymous" unlocks the public link with password "%public%"
When "Anonymous" renames the following resource
| resource | as |
Expand Down
4 changes: 3 additions & 1 deletion tests/e2e/cucumber/features/smoke/shortcut.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ Feature: Users can create shortcuts for resources and sites
| resource | recipient | type | role |
| logo.jpg | Brian | user | Can view |
And "Alice" opens the "files" app
And "Alice" creates a public link for the resource "docs/notice.txt" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| docs/notice.txt | %public% |
And "Alice" renames the most recently created public link of resource "docs/notice.txt" to "myPublicLink"
And "Alice" opens the "files" app

Expand Down
6 changes: 4 additions & 2 deletions tests/e2e/cucumber/features/smoke/spaces/internalLink.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ Feature: internal link share in project space
And "Alice" renames the most recently created public link of space to "spaceLink"
And "Alice" edits the public link named "spaceLink" of the space changing role to "Invited people"
# internal link to folder
And "Alice" creates a public link for the resource "myfolder" with password "%public%" using the sidebar panel
When "Alice" edits the public link named "Link" of resource "myfolder" changing role to "Invited people"
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | role | password |
| myfolder | Invited people | %public% |
# When "Alice" edits the public link named "Link" of resource "myfolder" changing role to "Invited people"
And "Alice" logs out

And "Brian" opens the public link "Link"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ Feature: spaces participant management
Then "Carol" should see folder "parent" but should not be able to edit
# page reload is necessary to fetch all the changes made by user Brian
When "Alice" reloads the spaces page
And "Alice" creates a public link for the resource "parent" with password "%public%" using the sidebar panel
And "Alice" edits the public link named "Link" of resource "parent" changing role to "Can edit"
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | role | password |
| parent | Can edit | %public% |
And "Anonymous" opens the public link "Link"
And "Anonymous" unlocks the public link with password "%public%"
And "Anonymous" uploads the following resources in public link page
Expand Down
11 changes: 7 additions & 4 deletions tests/e2e/cucumber/features/smoke/spaces/project.feature
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ Feature: spaces.personal
| lorem.txt | folderPublic |
| lorem.txt | folder_to_shared |

And "Alice" creates a public link for the resource "folderPublic" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | role | password |
| folderPublic | Secret File Drop | %public% |
And "Alice" renames the most recently created public link of resource "folderPublic" to "team.1"
And "Alice" edits the public link named "team.1" of resource "folderPublic" changing role to "Secret File Drop"
And "Alice" sets the expiration date of the public link named "team.1" of resource "folderPublic" to "+5 days"

# borrowed from share.feature
Expand All @@ -74,7 +75,9 @@ Feature: spaces.personal
| resource | to |
| lorem.txt | folderPublic |

And "Alice" creates a public link for the resource "folderPublic" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| folderPublic | %public% |
And "Alice" renames the most recently created public link of resource "folderPublic" to "team.2"
And "Alice" edits the public link named "team.2" of resource "folderPublic" changing role to "Secret File Drop"
And "Alice" sets the expiration date of the public link named "team.2" of resource "folderPublic" to "+5 days"
Expand Down Expand Up @@ -168,5 +171,5 @@ Feature: spaces.personal
| textfile.txt | parent |
And "Brian" restores following resources
| resource | to | version | openDetailsPanel |
| textfile.txt | parent | 1 |true |
| textfile.txt | parent | 1 | true |
And "Brian" logs out
20 changes: 15 additions & 5 deletions tests/e2e/cucumber/features/smoke/spaces/publicLink.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,25 @@ Feature: spaces public link
| testavatar.jpg |
And "Alice" creates a public link for the space with password "%public%" using the sidebar panel
And "Alice" renames the most recently created public link of space to "spaceLink"
And "Alice" creates a public link for the resource "spaceFolder" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| spaceFolder | %public% |
And "Alice" renames the most recently created public link of resource "spaceFolder" to "folderLink"
And "Alice" creates a public link for the resource "spaceFolder/shareToBrian.txt" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| spaceFolder/shareToBrian.txt | %public% |
And "Alice" renames the most recently created public link of resource "spaceFolder/shareToBrian.txt" to "textLink"
And "Alice" creates a public link for the resource "spaceFolder/subFolder/shareToBrian.md" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| spaceFolder/subFolder/shareToBrian.md | %public% |
And "Alice" renames the most recently created public link of resource "spaceFolder/subFolder/shareToBrian.md" to "markdownLink"
And "Alice" creates a public link for the resource "simple.pdf" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| simple.pdf | %public% |
And "Alice" renames the most recently created public link of resource "simple.pdf" to "pdfLink"
And "Alice" creates a public link for the resource "testavatar.jpg" with password "%public%" using the sidebar panel
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| testavatar.jpg | %public% |
And "Alice" renames the most recently created public link of resource "testavatar.jpg" to "imageLink"
And "Alice" logs out
When "Brian" logs in
Expand Down
Loading

0 comments on commit dbe2e32

Please sign in to comment.