Skip to content

Commit

Permalink
check that image is open
Browse files Browse the repository at this point in the history
  • Loading branch information
ScharfViktor committed Mar 11, 2024
1 parent befe172 commit f7d9e33
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The version of OCIS to use in pipelines that test against OCIS
OCIS_COMMITID=2e7f0252f2a1b2c8200bf0931274b9e9e83f3c0a
OCIS_COMMITID=ef188a14f76364fbe4cd6892736c263eb9deee7b
OCIS_BRANCH=master
62 changes: 58 additions & 4 deletions tests/e2e/cucumber/features/smoke/shares/link.feature
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ Feature: link
| lorem.txt | lorem_new.txt |
| textfile.txt | textfile_new.txt |
| new-lorem.txt | test.txt |
# currently upload folder feature is not available in playwright
# And "Anonymous" uploads the following resources in public link page
# | resource |
# | filesForUpload/PARENT |
# currently upload folder feature is not available in playwright
# And "Anonymous" uploads the following resources in public link page
# | resource |
# | filesForUpload/PARENT |
And "Alice" removes the public link named "myPublicLink" of resource "folderPublic"
And "Anonymous" should not be able to open the old link "myPublicLink"
And "Alice" logs out
Expand Down Expand Up @@ -77,6 +77,7 @@ Feature: link
Given "Admin" creates following user using API
| id |
| Brian |
| Carol |
And "Alice" logs in
And "Alice" creates the following folders in personal space using API
| name |
Expand Down Expand Up @@ -137,10 +138,63 @@ Feature: link
And "Brian" closes the file viewer
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
And "Brian" closes the file viewer
And "Brian" logs out

# authenticated user without access to resources. should be redirected to the public links page
And "Carol" logs in
When "Carol" opens the public link "folderLink"
And "Carol" unlocks the public link with password "%public%"
# https://github.com/owncloud/web/issues/10473
And "Carol" downloads the following public link resources using the sidebar panel
| resource | type |
| lorem.txt | file |
When "Carol" opens the public link "textLink"
And "Carol" unlocks the public link with password "%public%"
Then "Carol" is in a text-editor
And "Carol" closes the file viewer
When "Carol" opens the public link "markdownLink"
And "Carol" unlocks the public link with password "%public%"
Then "Carol" is in a text-editor
And "Carol" closes the file viewer
When "Carol" opens the public link "pdfLink"
And "Carol" unlocks the public link with password "%public%"
Then "Carol" is in a pdf-viewer
And "Carol" closes the file viewer
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
And "Carol" closes the file viewer
And "Carol" logs out

# Anonymous user
When "Anonymous" opens the public link "folderLink"
And "Anonymous" unlocks the public link with password "%public%"
And "Anonymous" downloads the following public link resources using the sidebar panel
| resource | type |
| lorem.txt | file |
When "Anonymous" opens the public link "textLink"
And "Anonymous" unlocks the public link with password "%public%"
Then "Anonymous" is in a text-editor
And "Anonymous" closes the file viewer
When "Anonymous" opens the public link "markdownLink"
And "Anonymous" unlocks the public link with password "%public%"
Then "Anonymous" is in a text-editor
And "Anonymous" closes the file viewer
When "Anonymous" opens the public link "pdfLink"
And "Anonymous" unlocks the public link with password "%public%"
Then "Anonymous" is in a pdf-viewer
And "Anonymous" closes the file viewer
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
And "Anonymous" closes the file viewer
And "Alice" logs out


Scenario: add banned password for public link
When "Alice" logs in
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/support/objects/app-files/utils/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const closeTextEditorOrViewerButton = '#app-top-bar-close'
const saveTextEditorOrViewerButton = '#app-save-action'
const texEditor = '#text-editor'
const pdfViewer = '#pdf-viewer'
const imageViewer = '#preview'
const imageViewer = '.stage'

export const close = (page: Page): Promise<unknown> => {
return Promise.all([
Expand Down

0 comments on commit f7d9e33

Please sign in to comment.