Skip to content

Commit

Permalink
[tests-only] [full-ci] Port PR #10670 (#10837)
Browse files Browse the repository at this point in the history
* [tests-only] [full-ci] Remove acceptance test related to image preview (#10670)

* remove acceptance test related to media preview

* address review

* add assertion for media navigation action

* change step description

* select the first element found by locator

* refactor test step to download from topbar

* update step description

* remove identical step implementation to download resource from media viewer
  • Loading branch information
Salipa-Gurung committed May 2, 2024
1 parent fd80f97 commit d3870de
Show file tree
Hide file tree
Showing 21 changed files with 186 additions and 199 deletions.
2 changes: 0 additions & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ config = {
],
"suites": {
"oCISBasic": [
"webUIPreview",
"webUILogin",
],
"oCISFiles1": [
Expand Down Expand Up @@ -169,7 +168,6 @@ basicTestSuites = [
"webUIFilesDetails",
"webUILogin",
"webUIMoveFilesFolders",
"webUIPreview",
"webUIRenameFiles",
"webUISharingAcceptShares",
"webUISharingInternalGroupsEdgeCases",
Expand Down
136 changes: 0 additions & 136 deletions tests/acceptance/features/webUIPreview/mediaPreview.feature

This file was deleted.

2 changes: 1 addition & 1 deletion tests/e2e/cucumber/features/app-provider/lock.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Feature: lock
And for "Alice" file "test.odt" should be locked

# checking that sharing/unsharing and creating link of the locked file is possible
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
And "Alice" creates a public link of following resource using the sidebar panel
| resource | password |
| test.odt | %public% |
And "Alice" shares the following resource using the sidebar panel
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/cucumber/features/app-provider/officeSuites.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ 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 creates a public link of following resource using the sidebar panel
And "Alice" creates a public link of following resource using the sidebar panel
| resource | role | password |
| OpenDocument.odt | Can edit | %public% |
And "Alice" logs out
Expand All @@ -29,7 +29,7 @@ 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 creates a public link of following resource using the sidebar panel
And "Alice" creates a public link of following resource using the sidebar panel
| resource | role | password |
| MicrosoftWord.docx | Can edit | %public% |
And "Alice" logs out
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/cucumber/features/shares/internalLink.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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 creates a public link of following resource using the sidebar panel
And "Alice" 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"
Expand Down
31 changes: 20 additions & 11 deletions tests/e2e/cucumber/features/shares/link.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: link
| folderPublic/lorem.txt | lorem ipsum |

And "Alice" opens the "files" app
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
And "Alice" 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"
Expand Down Expand Up @@ -86,33 +86,38 @@ Feature: link
| localFile | to |
| filesForUpload/simple.pdf | simple.pdf |
| filesForUpload/testavatar.jpg | testavatar.jpg |
| filesForUpload/test_video.mp4 | test_video.mp4 |
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" opens the "files" app
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
And "Alice" 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 creates a public link of following resource using the sidebar panel
And "Alice" 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 creates a public link of following resource using the sidebar panel
And "Alice" 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 creates a public link of following resource using the sidebar panel
And "Alice" 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 creates a public link of following resource using the sidebar panel
And "Alice" 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" creates a public link of following resource using the sidebar panel
| resource | password |
| test_video.mp4 | %public% |
And "Alice" renames the most recently created public link of resource "test_video.mp4" to "videoLink"
And "Alice" logs out

# authenticated user with access to resources. should be redirected to shares with me page
Expand Down Expand Up @@ -146,7 +151,7 @@ Feature: link
When "Brian" opens the public link "imageLink"
And "Brian" unlocks the public link with password "%public%"
# https://github.com/owncloud/ocis/issues/8602
Then "Brian" is in a image-viewer
Then "Brian" is in a media-viewer
And "Brian" closes the file viewer
And "Brian" downloads the following public link resources using the single share view
| resource | type |
Expand Down Expand Up @@ -182,7 +187,7 @@ Feature: link
When "Carol" opens the public link "imageLink"
And "Carol" unlocks the public link with password "%public%"
# https://github.com/owncloud/ocis/issues/8602
Then "Carol" is in a image-viewer
Then "Carol" is in a media-viewer
And "Carol" closes the file viewer
And "Carol" downloads the following public link resources using the single share view
| resource | type |
Expand Down Expand Up @@ -216,11 +221,15 @@ Feature: link
When "Anonymous" opens the public link "imageLink"
And "Anonymous" unlocks the public link with password "%public%"
# https://github.com/owncloud/ocis/issues/8602
Then "Anonymous" is in a image-viewer
Then "Anonymous" is in a media-viewer
And "Anonymous" closes the file viewer
And "Anonymous" downloads the following public link resources using the single share view
| resource | type |
| testavatar.jpg | file |
When "Anonymous" opens the public link "videoLink"
And "Anonymous" unlocks the public link with password "%public%"
Then "Anonymous" is in a media-viewer
And "Anonymous" closes the file viewer


Scenario: add banned password for public link
Expand All @@ -230,7 +239,7 @@ Feature: link
| 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
And "Alice" 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"
Expand Down Expand Up @@ -263,7 +272,7 @@ Feature: link
| pathToFile | content |
| folderPublic/lorem.txt | lorem ipsum |
And "Alice" opens the "files" app
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
And "Alice" creates a public link of following resource using the sidebar panel
| resource | role | password |
| folderPublic | Can edit | %public% |
And "Alice" renames the most recently created public link of resource "folderPublic" to "myPublicLink"
Expand Down
59 changes: 56 additions & 3 deletions tests/e2e/cucumber/features/shares/share.feature
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,67 @@ Feature: share
| shareToBrian.md | new readme content edited |
And "Alice" uploads the following resource
| resource |
| testavatar.jpeg |
| simple.pdf |
When "Alice" shares the following resource using the sidebar panel
| sampleGif.gif |
| testimage.mp3 |
| sampleOgg.ogg |
| sampleWebm.webm |
| test_video.mp4 |
| testavatar.jpeg |
| testavatar.png |
When "Alice" opens a file "testavatar.png" in the media-viewer using the sidebar panel
Then "Alice" is in a media-viewer
When "Alice" closes the file viewer
And "Alice" opens the following file in mediaviewer
| resource |
| testavatar.jpeg |
Then "Alice" is in a media-viewer
When "Alice" navigates to the next media resource
And "Alice" navigates to the previous media resource
And "Alice" closes the file viewer
And "Alice" opens the following file in mediaviewer
| resource |
| sampleGif.gif |
Then "Alice" is in a media-viewer
When "Alice" closes the file viewer
And "Alice" opens the following file in mediaviewer
| resource |
| testimage.mp3 |
Then "Alice" is in a media-viewer
When "Alice" closes the file viewer
And "Alice" opens the following file in mediaviewer
| resource |
| sampleOgg.ogg |
Then "Alice" is in a media-viewer
When "Alice" closes the file viewer
And "Alice" opens the following file in mediaviewer
| resource |
| sampleWebm.webm |
Then "Alice" is in a media-viewer
When "Alice" closes the file viewer
And "Alice" opens the following file in mediaviewer
| resource |
| test_video.mp4 |
Then "Alice" is in a media-viewer
When "Alice" downloads the following resource using the preview topbar
| resource | type |
| test_video.mp4 | file |
And "Alice" closes the file viewer
And "Alice" shares the following resource using the sidebar panel
| resource | recipient | type | role | resourceType |
| shareToBrian.txt | Brian | user | Can edit | file |
| shareToBrian.md | Brian | user | Can edit | file |
| testavatar.jpeg | Brian | user | Can view | file |
| simple.pdf | Brian | user | Can edit | file |
| sharedFile.txt | Brian | user | Can edit | file |
And "Alice" navigates to the shared with others page
And "Alice" opens the following file in mediaviewer
| resource |
| testavatar.jpeg |
Then "Alice" is in a media-viewer
When "Alice" closes the file viewer

And "Brian" opens the "files" app
And "Brian" navigates to the shared with me page
And "Brian" disables the sync for the following share
| name |
Expand All @@ -107,11 +158,13 @@ Feature: share
And "Brian" opens the following file in mediaviewer
| resource |
| testavatar.jpeg |
And "Brian" closes the file viewer
Then "Brian" is in a media-viewer
When "Brian" closes the file viewer
And "Brian" opens the following file in pdfviewer
| resource |
| simple.pdf |
And "Brian" closes the file viewer
And "Alice" navigates to the personal space page
And "Alice" removes following sharee
| resource | recipient |
| shareToBrian.txt | Brian |
Expand Down

0 comments on commit d3870de

Please sign in to comment.