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 authored and saw-jan committed May 14, 2024
1 parent 4eb2e41 commit 608279b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 22 deletions.
1 change: 1 addition & 0 deletions tests/e2e/cucumber/features/shares/link.feature
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,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 media-viewer
And "Carol" closes the file viewer
And "Carol" downloads the following public link resources using the single share view
Expand Down
13 changes: 7 additions & 6 deletions tests/e2e/cucumber/features/shares/share.feature
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ Feature: share
| 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 |
| 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 |
Expand All @@ -165,6 +165,7 @@ Feature: share
| 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
12 changes: 6 additions & 6 deletions tests/e2e/cucumber/features/smoke/download.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ Feature: Download
And "Alice" opens the following file in mediaviewer
| resource |
| testavatar.jpg |
And "Alice" downloads the following image from the mediaviewer
| resource |
| testavatar.jpg |
And "Alice" downloads the following resources using the preview topbar
| resource | type |
| testavatar.jpg | file |
And "Alice" closes the file viewer
And "Alice" logs out

Expand All @@ -59,7 +59,7 @@ Feature: Download
And "Brian" opens the following file in mediaviewer
| resource |
| testavatar.jpg |
And "Brian" downloads the following image from the mediaviewer
| resource |
| testavatar.jpg |
And "Brian" downloads the following resources using the preview topbar
| resource | type |
| testavatar.jpg | file |
And "Brian" logs out
19 changes: 19 additions & 0 deletions tests/e2e/cucumber/features/smoke/languageChange.feature
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,22 @@ Feature: language settings
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 a public link of following resource using the sidebar panel
| resource | password |
| folderPublic | %public% |
And "Alice" logs out
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"
Then "Anonymous" should see the following account page title "Konto"
9 changes: 0 additions & 9 deletions tests/e2e/cucumber/steps/ui/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,6 @@ When(
}
)

When(
/^"([^"]*)" downloads the following image(?:s)? from the mediaviewer$/,
async function (this: World, stepUser: string, stepTable: DataTable) {
const { page } = this.actorsEnvironment.getActor({ key: stepUser })
const resourceObject = new objects.applicationFiles.Resource({ page })
await processDownload(stepTable, resourceObject, 'preview')
}
)

When(
/^"([^"]*)" deletes the following resource(?:s)? using the (sidebar panel|batch action)$/,
async function (this: World, stepUser: string, actionType: string, stepTable: DataTable) {
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/support/objects/app-files/resource/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { config } from '../../../../config'
import { buildXpathLiteral } from '../../../utils/locator'

const topbarFilenameSelector = '#app-top-bar-resource .oc-resource-name'
const downloadPreviewButton = '//button[contains(@id, "preview-download")]'
const downloadFileButtonSingleShareView = '.oc-files-actions-download-file-trigger'
const downloadFolderButtonSingleShareView = '.oc-files-actions-download-archive-trigger'
const filesView = '#files-view'
Expand Down

0 comments on commit 608279b

Please sign in to comment.