Skip to content

Commit

Permalink
Fix third batch of acceptance tests for owncloud#8446
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalwengerter committed Apr 11, 2023
1 parent 5816811 commit 89de1d6
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Other free text and markdown formatting can be used elsewhere in the document if
- [webUISharingPublicManagement/shareByPublicLink.feature:24](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature#L24)

### [Uploading folders does not work in files-drop](https://github.com/owncloud/web/issues/2443)
- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:245](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L245)
- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:263](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L263)

### [Writing to locked files/folders give only a generic error message](https://github.com/owncloud/web/issues/5741)
- [webUIWebdavLockProtection/upload.feature:32](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIWebdavLockProtection/upload.feature#L32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Other free text and markdown formatting can be used elsewhere in the document if
- [webUISharingPublicManagement/shareByPublicLink.feature:24](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature#L24)

### [Uploading folders does not work in files-drop](https://github.com/owncloud/web/issues/2443)
- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:245](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L245)
- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:263](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L263)

### [Resources cannot be locked under ocis](https://github.com/owncloud/ocis/issues/1284)
- [webUIWebdavLockProtection/delete.feature:33](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIWebdavLockProtection/delete.feature#L33)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ Feature: Edit public link shares
And user "Alice" has logged in using the webUI
When the user tries to edit the public link named "Public-link" of folder "simple-folder" changing the role to "Viewer"
And the public uses the webUI to access the last public link created by user "Alice" in a new session
Then file "lorem.txt" should be listed on the webUI
And it should not be possible to delete file "lorem.txt" using the webUI
Then file "lorem.txt" should be listed on the webUI as single share
And it should not be possible to delete file "lorem.txt" as single share using the webUI

@issue-ocis-reva-292 @disablePreviews
Scenario: user edits the permission of an already existing public link from read to read-write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ Feature: Share by public link with different roles
Given user "Alice" has been created with default attributes and without skeleton files in the server
And user "Alice" has created folder "simple-folder" in the server

Scenario Outline: simple sharing by public link with read-only role
Given user "Alice" has created file "simple-folder/lorem.txt" in the server
And user "Alice" has logged in using the webUI
When the user creates a new public link for folder "simple-folder" using the webUI
And the user sets the role of the most recently created public link of resource "simple-folder" to "<role>"
Then user "Alice" should have a share with these details in the server:
| field | value |
| share_type | public_link |
| uid_owner | Alice |
| permissions | <permissions> |
| path | /simple-folder |
# Once issue @issue-ocis-reva-383 is resolved uncomment lines below
# | name | Link |
# And a link named "Link" should be listed with role "<role>" in the public link list of folder "simple-folder" on the webUI
When the public uses the webUI to access the last public link created by user "Alice" in a new session
Then file "lorem.txt" should be listed on the webUI as single share
Examples:
| role | permissions |
| Viewer | read |

@smokeTest @ocisSmokeTest @issue-ocis-reva-383
Scenario Outline: simple sharing by public link with different roles
Given user "Alice" has created file "simple-folder/lorem.txt" in the server
Expand All @@ -27,10 +47,9 @@ Feature: Share by public link with different roles
| name | Link |
And a link named "Link" should be listed with role "<role>" in the public link list of folder "simple-folder" on the webUI
When the public uses the webUI to access the last public link created by user "Alice" in a new session
Then file "lorem.txt" should be listed on the webUI as single share
Then file "lorem.txt" should be listed on the webUI
Examples:
| role | permissions |
| Viewer | read |
| Editor | read, update, create, delete |
| Contributor | read, create |

Expand All @@ -48,10 +67,9 @@ Feature: Share by public link with different roles
| permissions | <permissions> |
| path | /simple-folder |
When the public uses the webUI to access the last public link created by user "Alice" in a new session
Then file "lorem.txt" should be listed on the webUI as single share
Then file "lorem.txt" should be listed on the webUI
Examples:
| role | permissions |
| Viewer | read |
| Editor | read, update, create, delete |
| Contributor | read, create |

Expand Down Expand Up @@ -133,7 +151,7 @@ Feature: Share by public link with different roles
Given user "Alice" has created file "simple-folder/lorem.txt" in the server
And user "Alice" has shared folder "simple-folder" with link with "read" permissions in the server
When the public uses the webUI to access the last public link created by user "Alice" in a new session
Then it should not be possible to delete file "lorem.txt" using the webUI
Then it should not be possible to delete file "lorem.txt" as single share using the webUI


Scenario: creating a public link with "Editor" role makes it possible to upload a file
Expand Down
3 changes: 3 additions & 0 deletions tests/acceptance/pageObjects/personalPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ module.exports = {
)
return canCreate
},
checkForNonPresentDeleteButtonInSingleShareView: function () {
return this.waitForElementNotPresent('@deleteSelectedButton')
},
deleteAllCheckedFiles: function () {
return this.waitForElementVisible('@deleteSelectedButton')
.click('@deleteSelectedButton')
Expand Down
6 changes: 6 additions & 0 deletions tests/acceptance/stepDefinitions/filesContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,12 @@ Then(
)
}
)
Then(
'it should not be possible to delete file {string} as single share using the webUI',
function (resource) {
return client.page.personalPage().checkForNonPresentDeleteButtonInSingleShareView()
}
)

Then(
'it should be possible to delete file/folder {string} using the webUI',
Expand Down

0 comments on commit 89de1d6

Please sign in to comment.