Skip to content

Commit

Permalink
Add acceptance test suite webUISharingPublic
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Jan 30, 2019
1 parent f5aaff3 commit 27335f3
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 25 deletions.
11 changes: 11 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,17 @@ matrix:
USE_EMAIL: true
INSTALL_NOTIFICATIONS_APP: true

- PHP_VERSION: 7.1
TEST_SUITE: selenium
BEHAT_SUITE: webUISharingPublic
DB_TYPE: mariadb
USE_SERVER: true
INSTALL_SERVER: true
CHOWN_SERVER: true
OWNCLOUD_LOG: true
INSTALL_TESTING_APP: true
USE_EMAIL: true

- PHP_VERSION: 7.1
TEST_SUITE: selenium
BEHAT_SUITE: webUITags
Expand Down
12 changes: 12 additions & 0 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,18 @@ default:
- WebUINotificationsContext:
- WebUISharingContext:

webUISharingPublic:
paths:
- '%paths.base%/../features/webUISharingPublic'
contexts:
- FeatureContext: *common_feature_context_params
- EmailContext:
- PublicWebDavContext:
- WebUIFilesContext:
- WebUIGeneralContext:
- WebUILoginContext:
- WebUISharingContext:

webUITags:
paths:
- '%paths.base%/../features/webUITags'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ Feature: Federation Sharing - sharing with users on other cloud storages
And user "user3" from server "REMOTE" has shared "lorem.txt" with user "user1" from server "LOCAL"
And the user has reloaded the current page of the webUI
Then dialogs should be displayed on the webUI
| title | content |
| Remote share | Do you want to add the remote share /simple-folder from user1@%remote_server_without_scheme%? |
| Remote share | Do you want to add the remote share /simple-empty-folder from user2@%remote_server_without_scheme%? |
| Remote share | Do you want to add the remote share /lorem.txt from user3@%remote_server_without_scheme%? |
| title | content |
| Remote share | Do you want to add the remote share /simple-folder from user1@%remote_server_without_scheme%? |
| Remote share | Do you want to add the remote share /simple-empty-folder from user2@%remote_server_without_scheme%? |
| Remote share | Do you want to add the remote share /lorem.txt from user3@%remote_server_without_scheme%? |
When the user accepts the offered remote shares using the webUI
Then file "lorem (2).txt" should be listed on the webUI
And the content of "lorem (2).txt" on the local server should be the same as the original "lorem.txt"
Expand All @@ -54,16 +54,16 @@ Feature: Federation Sharing - sharing with users on other cloud storages
Then file "lorem (2).txt" should not be listed on the webUI
And file "lorem (2).txt" should not be listed in the shared-with-you page on the webUI

Scenario: automatically accept a federation share when it is allowed by the config
Given parameter "autoAddServers" of app "federation" has been set to "1"
And user "user1" from server "REMOTE" has shared "simple-folder" with user "user1" from server "LOCAL"
And user "user1" from server "LOCAL" has accepted the last pending share
And the user has reloaded the current page of the webUI
And parameter "auto_accept_trusted" of app "federatedfilesharing" has been set to "yes"
And parameter "autoAddServers" of app "federation" has been set to "0"
When user "user1" from server "REMOTE" shares "/lorem.txt" with user "user1" from server "LOCAL" using the sharing API
And the user has reloaded the current page of the webUI
Then file "lorem (2).txt" should be listed on the webUI
Scenario: automatically accept a federation share when it is allowed by the config
Given parameter "autoAddServers" of app "federation" has been set to "1"
And user "user1" from server "REMOTE" has shared "simple-folder" with user "user1" from server "LOCAL"
And user "user1" from server "LOCAL" has accepted the last pending share
And the user has reloaded the current page of the webUI
And parameter "auto_accept_trusted" of app "federatedfilesharing" has been set to "yes"
And parameter "autoAddServers" of app "federation" has been set to "0"
When user "user1" from server "REMOTE" shares "/lorem.txt" with user "user1" from server "LOCAL" using the sharing API
And the user has reloaded the current page of the webUI
Then file "lorem (2).txt" should be listed on the webUI

@skipOnMICROSOFTEDGE
Scenario: share a folder with an remote user and prohibit deleting - local server shares - remote server receives
Expand Down Expand Up @@ -200,7 +200,7 @@ Feature: Federation Sharing - sharing with users on other cloud storages
Given using server "LOCAL"
And these users have been created:
| username |
| user2 |
| user2 |
When the user shares folder "simple-folder" with remote user "user1@%remote_server_without_scheme%" using the webUI
And user "user1" re-logs in to "%remote_server%" using the webUI
And the user accepts the offered remote shares using the webUI
Expand All @@ -214,7 +214,7 @@ Feature: Federation Sharing - sharing with users on other cloud storages
Given using server "LOCAL"
And these users have been created:
| username |
| user2 |
| user2 |
When the user shares folder "simple-folder" with remote user "user1@%remote_server_without_scheme%" using the webUI
And user "user1" re-logs in to "%remote_server%" using the webUI
And the user accepts the offered remote shares using the webUI
Expand All @@ -227,12 +227,12 @@ Feature: Federation Sharing - sharing with users on other cloud storages
And as "user2" file "/simple-folder (2)/lorem.txt" should exist
When the user opens folder "simple-folder (2)" using the webUI
Then it should not be possible to delete file "lorem.txt" using the webUI

Scenario: test resharing folder and set it as readonly by owner
Given using server "LOCAL"
And these users have been created:
| username |
| user2 |
| user2 |
When the user shares folder "simple-folder" with remote user "user1@%remote_server_without_scheme%" using the webUI
And user "user1" re-logs in to "%remote_server%" using the webUI
And the user accepts the offered remote shares using the webUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ Feature: Share by public link
Given parameter "shareapi_allow_public_notification" of app "core" has been set to "yes"
And the user has reloaded the current page of the webUI
And the user has created a new public link for folder "simple-folder" using the webUI with
| email | foo1234@bar.co|
| password| pass123 |
| email | foo1234@bar.co |
| password | pass123 |
When the user opens the edit public link share popup for the link named "Public link"
And the user enters the password "qwertyui" on the edit public link share popup for the link
And the user does not save any changes in the edit public link share popup
Expand Down Expand Up @@ -269,9 +269,9 @@ Feature: Share by public link
When the user changes the permission of the public link named "Public link" to "read-write"
And the public accesses the last created public link using the webUI
And the user deletes the following elements using the webUI
| name |
| simple-empty-folder |
| lorem.txt |
| name |
| simple-empty-folder |
| lorem.txt |
Then the deleted elements should not be listed on the webUI
And the deleted elements should not be listed on the webUI after a page reload

Expand All @@ -284,7 +284,7 @@ Feature: Share by public link
When the user changes the expiration of the public link named "Public link" of file "lorem.txt" to "21-07-2038"
And the user gets the info of the last share using the sharing API
Then the fields of the last response should include
| expiration | 21-07-2038 |
| expiration | 21-07-2038 |

Scenario: user tries to change the expiration date of the public link to past date using webUI
Given user "user1" has created a share with settings
Expand All @@ -296,7 +296,7 @@ Feature: Share by public link
And the user gets the info of the last share using the sharing API
Then the user should see an error message on the public link share dialog saying "Expiration date is in the past"
And the fields of the last response should include
| expiration | 14-10-2038 |
| expiration | 14-10-2038 |

Scenario: share two file with same name but different paths by public link
When the user creates a new public link for file "lorem.txt" using the webUI
Expand Down

0 comments on commit 27335f3

Please sign in to comment.