Skip to content

Commit

Permalink
[tests-only] [full-ci] Remove acceptance test related to image preview (
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
Salipa-Gurung committed Apr 26, 2024
1 parent e8c3b22 commit 0b4f5ba
Show file tree
Hide file tree
Showing 18 changed files with 185 additions and 54 deletions.
2 changes: 0 additions & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ config = {
],
"suites": {
"oCISBasic": [
"webUIPreview",
"webUILogin",
],
"oCISFiles1": [
Expand Down Expand Up @@ -177,7 +176,6 @@ basicTestSuites = [
"webUIFilesDetails",
"webUILogin",
"webUIMoveFilesFolders",
"webUIPreview",
"webUIRenameFiles",
"webUIRenameFolders",
"webUISharingAcceptShares",
Expand Down
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 @@ -33,7 +33,7 @@ Feature: lock
Then 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
32 changes: 20 additions & 12 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 @@ -181,8 +186,7 @@ Feature: link
| simple.pdf | file |
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 +220,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 +238,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 +271,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
69 changes: 60 additions & 9 deletions tests/e2e/cucumber/features/shares/share.feature
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,65 @@ Feature: share
| sharedFile.txt | txtFile | some text |
And "Alice" uploads the following resource
| resource |
| testavatar.jpeg |
| simple.pdf |
When "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 |
| 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 | custom_permissions:read,update,share | 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
Expand All @@ -105,7 +155,8 @@ 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 |
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/cucumber/features/smoke/rename.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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 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 |
| folder | Can edit | %public% |
And "Brian" logs in
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/cucumber/features/smoke/shortcut.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: Users can create shortcuts for resources and sites
| resource | recipient | type | role |
| testavatar.jpg | Brian | user | Can view |
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 |
| docs/notice.txt | %public% |
And "Alice" renames the most recently created public link of resource "docs/notice.txt" to "myPublicLink"
Expand All @@ -47,7 +47,7 @@ Feature: Users can create shortcuts for resources and sites
| resource | name | type |
| testavatar.jpg | logo | file |
And "Brian" opens a shortcut "logo.url"
Then "Brian" is in a image-viewer
Then "Brian" is in a media-viewer
And "Brian" closes the file viewer

# create a shortcut to the public link
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/cucumber/features/spaces/internalLink.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ 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 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 |
| myfolder | Invited people | %public% |
# When "Alice" edits the public link named "Link" of resource "myfolder" changing role to "Invited people"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ 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 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 |
| parent | Can edit | %public% |
And "Anonymous" opens the public link "Link"
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/cucumber/features/spaces/project.feature
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Feature: spaces.personal
| lorem.txt | folderPublic |
| lorem.txt | folder_to_shared |

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 "team.1"
Expand All @@ -75,7 +75,7 @@ Feature: spaces.personal
| resource | to |
| lorem.txt | folderPublic |

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 "team.2"
Expand Down
12 changes: 6 additions & 6 deletions tests/e2e/cucumber/features/spaces/publicLink.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ 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 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 |
| spaceFolder | %public% |
And "Alice" renames the most recently created public link of resource "spaceFolder" 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 |
| 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 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 |
| 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 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"
Expand Down Expand Up @@ -89,7 +89,7 @@ Feature: spaces public link
And "David" edits the public link named "folderLink" of resource "spaceFolder" changing role to "Can edit"
When "David" opens the public link "imageLink"
And "David" unlocks the public link with password "%public%"
Then "David" is in a image-viewer
Then "David" is in a media-viewer
And "David" closes the file viewer
And "David" logs out

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/cucumber/steps/ui/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { World } from '../../environment'
import { objects } from '../../../support'

When(
'{string} creates a public link creates a public link of following resource using the sidebar panel',
'{string} creates a public link of following resource using the sidebar panel',
async function (this: World, stepUser: string, stepTable: DataTable) {
const { page } = this.actorsEnvironment.getActor({ key: stepUser })
const linkObject = new objects.applicationFiles.Link({ page })
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/cucumber/steps/ui/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ When(
)

Then(
/^"([^"]*)" is in a (text-editor|pdf-viewer|image-viewer)$/,
/^"([^"]*)" is in a (text-editor|pdf-viewer|media-viewer)$/,
async function (this: World, stepUser: string, fileViewerType: string): Promise<void> {
const { page } = this.actorsEnvironment.getActor({ key: stepUser })
const fileViewerLocator = editor.fileViewerLocator({ page, fileViewerType })
Expand Down

0 comments on commit 0b4f5ba

Please sign in to comment.