Skip to content

Commit

Permalink
check that image is open (#10571)
Browse files Browse the repository at this point in the history
Co-authored-by: Sawjan Gurung <saw.jan.grg3e@gmail.com>
  • Loading branch information
ScharfViktor and saw-jan authored Mar 12, 2024
1 parent 1f55696 commit 6320d99
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 19 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
42 changes: 34 additions & 8 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 @@ -86,10 +86,10 @@ Feature: link
| 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" uploads the following resource
| resource |
| simple.pdf |
| testavatar.jpg |
And "Alice" shares the following resource using API
| resource | recipient | type | role |
| folderPublic | Brian | user | Can edit |
Expand Down Expand Up @@ -143,6 +143,7 @@ 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
Expand All @@ -169,10 +170,35 @@ Feature: link
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


Scenario: add banned password for public link
When "Alice" logs in
Expand Down
15 changes: 7 additions & 8 deletions tests/e2e/cucumber/features/smoke/shortcut.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ Feature: Users can create shortcuts for resources and sites
And "Alice" creates the following files into personal space using API
| pathToFile | content |
| docs/notice.txt | important content |
And "Alice" uploads the following local file into personal space using API
| localFile | to |
| filesForUpload/testavatar.jpg | logo.jpg |
And "Alice" uploads the following resource
| resource |
| testavatar.jpg |
And "Alice" shares the following resource using API
| resource | recipient | type | role |
| logo.jpg | Brian | user | Can view |
And "Alice" opens the "files" app
| resource | recipient | type | role |
| testavatar.jpg | Brian | user | Can view |
And "Alice" creates a public link creates a public link of following resource using the sidebar panel
| resource | password |
| docs/notice.txt | %public% |
Expand All @@ -44,8 +43,8 @@ Feature: Users can create shortcuts for resources and sites
# create a shortcut to the shared file
When "Brian" logs in
And "Brian" creates a shortcut for the following resources
| resource | name | type |
| logo.jpg | logo | file |
| resource | name | type |
| testavatar.jpg | logo | file |
And "Brian" opens a shortcut "logo.url"
Then "Brian" is in a image-viewer
And "Brian" closes the file viewer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Feature: spaces public link
| David | Can manage | space |
And "Alice" navigates to the projects space page
And "Alice" navigates to the project space "team.1"
And "Alice" uploads the following resources via drag-n-drop
And "Alice" uploads the following resources
| resource |
| simple.pdf |
| testavatar.jpg |
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/cucumber/features/smoke/upload.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Feature: Upload
And "Admin" opens the "admin-settings" app
And "Admin" navigates to the users management page
When "Admin" changes the quota of the user "Alice" to "0.00001" using the sidebar panel
And "Admin" logs out
And "Alice" opens the "files" app


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 6320d99

Please sign in to comment.