Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>tags/v16.0.0alpha1
@@ -703,6 +703,20 @@ pipeline: | |||
when: | |||
matrix: | |||
TESTS-ACCEPTANCE: app-files | |||
acceptance-app-files-sharing: | |||
image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2 | |||
commands: | |||
- tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-app-files-sharing --selenium-server selenium:4444 allow-git-repository-modifications features/app-files-sharing.feature | |||
when: | |||
matrix: | |||
TESTS-ACCEPTANCE: app-files-sharing | |||
acceptance-app-files-sharing-link: | |||
image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2 | |||
commands: | |||
- tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-app-files-sharing-link --selenium-server selenium:4444 allow-git-repository-modifications features/app-files-sharing-link.feature | |||
when: | |||
matrix: | |||
TESTS-ACCEPTANCE: app-files-sharing-link | |||
acceptance-app-files-tags: | |||
image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2 | |||
commands: | |||
@@ -957,6 +971,10 @@ matrix: | |||
TESTS-ACCEPTANCE: app-comments | |||
- TESTS: acceptance | |||
TESTS-ACCEPTANCE: app-files | |||
- TESTS: acceptance | |||
TESTS-ACCEPTANCE: app-files-sharing | |||
- TESTS: acceptance | |||
TESTS-ACCEPTANCE: app-files-sharing-link | |||
- TESTS: acceptance | |||
TESTS-ACCEPTANCE: app-files-tags | |||
- TESTS: acceptance |
@@ -0,0 +1,149 @@ | |||
Feature: app-files-sharing-link | |||
Scenario: open the menu in a public shared link | |||
Given I act as John | |||
And I am logged in | |||
And I share the link for "welcome.txt" | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the shared link I wrote down | |||
And I open the Share menu | |||
Then I see that the Share menu is shown | |||
Scenario: hide download in a public shared link | |||
Given I act as John | |||
And I am logged in | |||
And I share the link for "welcome.txt" | |||
And I set the download of the shared link as hidden | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the shared link I wrote down | |||
Then I see that the download button is not shown | |||
And I see that the Share menu button is not shown | |||
Scenario: show download again in a public shared link | |||
Given I act as John | |||
And I am logged in | |||
And I share the link for "welcome.txt" | |||
And I set the download of the shared link as hidden | |||
And I set the download of the shared link as shown | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the shared link I wrote down | |||
Then I see that the download button is shown | |||
And I open the Share menu | |||
And I see that the Share menu is shown | |||
Scenario: creation is not possible by default in a public shared folder | |||
Given I act as John | |||
And I am logged in | |||
And I create a new folder named "Shared folder" | |||
# To share the link the "Share" inline action has to be clicked but, as the | |||
# details view is opened automatically when the folder is created, clicking | |||
# on the inline action could fail if it is covered by the details view due | |||
# to its opening animation. Instead of ensuring that the animations of the | |||
# contents and the details view have both finished it is easier to close the | |||
# details view and wait until it is closed before continuing. | |||
And I close the details view | |||
And I see that the details view is closed | |||
And I share the link for "Shared folder" | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the shared link I wrote down | |||
And I see that the file list is eventually loaded | |||
Then I see that it is not possible to create new files | |||
Scenario: create folder in a public editable shared folder | |||
Given I act as John | |||
And I am logged in | |||
And I create a new folder named "Editable shared folder" | |||
# To share the link the "Share" inline action has to be clicked but, as the | |||
# details view is opened automatically when the folder is created, clicking | |||
# on the inline action could fail if it is covered by the details view due | |||
# to its opening animation. Instead of ensuring that the animations of the | |||
# contents and the details view have both finished it is easier to close the | |||
# details view and wait until it is closed before continuing. | |||
And I close the details view | |||
And I see that the details view is closed | |||
And I share the link for "Editable shared folder" | |||
And I set the shared link as editable | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the shared link I wrote down | |||
And I create a new folder named "Subfolder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
Scenario: owner sees folder created in the public page of an editable shared folder | |||
Given I act as John | |||
And I am logged in | |||
And I create a new folder named "Editable shared folder" | |||
# To share the link the "Share" inline action has to be clicked but, as the | |||
# details view is opened automatically when the folder is created, clicking | |||
# on the inline action could fail if it is covered by the details view due | |||
# to its opening animation. Instead of ensuring that the animations of the | |||
# contents and the details view have both finished it is easier to close the | |||
# details view and wait until it is closed before continuing. | |||
And I close the details view | |||
And I see that the details view is closed | |||
And I share the link for "Editable shared folder" | |||
And I set the shared link as editable | |||
And I write down the shared link | |||
And I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the shared link I wrote down | |||
And I create a new folder named "Subfolder" | |||
And I see that the file list contains a file named "Subfolder" | |||
When I act as John | |||
And I enter in the folder named "Editable shared folder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
Scenario: set a password to a shared link | |||
Given I am logged in | |||
And I share the link for "welcome.txt" | |||
When I protect the shared link with the password "abcdef" | |||
Then I see that the working icon for password protect is shown | |||
And I see that the working icon for password protect is eventually not shown | |||
And I see that the link share is password protected | |||
# As Talk is not enabled in the acceptance tests of the server the checkbox | |||
# is never shown. | |||
And I see that the checkbox to protect the password of the link share by Talk is not shown | |||
Scenario: access a shared link protected by password with a valid password | |||
Given I act as John | |||
And I am logged in | |||
And I share the link for "welcome.txt" protected by the password "abcdef" | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the Authenticate page for the shared link I wrote down | |||
And I authenticate with password "abcdef" | |||
Then I see that the current page is the shared link I wrote down | |||
And I see that the shared file preview shows the text "Welcome to your Nextcloud account!" | |||
Scenario: access a shared link protected by password with an invalid password | |||
Given I act as John | |||
And I am logged in | |||
And I share the link for "welcome.txt" protected by the password "abcdef" | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I authenticate with password "fedcba" | |||
Then I see that the current page is the Authenticate page for the shared link I wrote down | |||
And I see that a wrong password for the shared file message is shown | |||
Scenario: access a direct download shared link protected by password with a valid password | |||
Given I act as John | |||
And I am logged in | |||
And I share the link for "welcome.txt" protected by the password "abcdef" | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the direct download shared link I wrote down | |||
And I see that the current page is the Authenticate page for the direct download shared link I wrote down | |||
And I authenticate with password "abcdef" | |||
# download starts no page redirection | |||
And I see that the current page is the Authenticate page for the direct download shared link I wrote down |
@@ -0,0 +1,269 @@ | |||
Feature: app-files-sharing | |||
Scenario: share a file with another user | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I rename "welcome.txt" to "farewell.txt" | |||
And I see that the file list contains a file named "farewell.txt" | |||
When I share "farewell.txt" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
Then I see that the file list contains a file named "farewell.txt" | |||
And I open the details view for "farewell.txt" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that the file is shared with me by "admin" | |||
Scenario: share a file with another user who already has a file with that name | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
When I share "welcome.txt" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
Then I see that the file list contains a file named "welcome (2).txt" | |||
And I open the details view for "welcome (2).txt" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that the file is shared with me by "admin" | |||
Scenario: share a skeleton file with another user before first login | |||
# If a file is shared with a user before her first login the skeleton would | |||
# not have been created, so if the shared file has the same name as one from | |||
# the skeleton the shared file will take its place and the skeleton file | |||
# will not be added. | |||
Given I act as John | |||
And I am logged in as the admin | |||
When I share "welcome.txt" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
And I am logged in | |||
Then I see that the file list contains a file named "welcome.txt" | |||
And I open the details view for "welcome.txt" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that the file is shared with me by "admin" | |||
Scenario: reshare a file with another user | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as Jim | |||
And I am logged in as "user1" | |||
And I act as John | |||
And I rename "welcome.txt" to "farewell.txt" | |||
And I see that the file list contains a file named "farewell.txt" | |||
And I share "farewell.txt" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
When I share "farewell.txt" with "user1" | |||
And I see that the file is shared with "user1" | |||
And I act as Jim | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
Then I see that the file list contains a file named "farewell.txt" | |||
And I open the details view for "farewell.txt" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that the file is shared with me by "user0" | |||
Scenario: owner sees reshares with other users | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I rename "welcome.txt" to "farewell.txt" | |||
And I see that the file list contains a file named "farewell.txt" | |||
And I share "farewell.txt" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I share "farewell.txt" with "user1" | |||
And I see that the file is shared with "user1" | |||
When I act as John | |||
# The Files app is open again to reload the file list and the shares | |||
And I open the Files app | |||
And I open the details view for "farewell.txt" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
Then I see that the file is shared with "user0" | |||
And I see that the file is shared with "user1" | |||
Scenario: share an empty folder with another user | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
When I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
Then I see that the file list contains a file named "Shared folder" | |||
And I open the details view for "Shared folder" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that the file is shared with me by "admin" | |||
Scenario: sharee sees a folder created by the owner in a shared folder | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
And I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I enter in the folder named "Shared folder" | |||
And I create a new folder named "Subfolder" | |||
And I see that the file list contains a file named "Subfolder" | |||
When I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I enter in the folder named "Shared folder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
Scenario: owner sees a folder created by the sharee in a shared folder | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
And I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I enter in the folder named "Shared folder" | |||
And I create a new folder named "Subfolder" | |||
And I see that the file list contains a file named "Subfolder" | |||
When I act as John | |||
And I enter in the folder named "Shared folder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
Scenario: resharee sees a folder created by the owner in a shared folder | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as Jim | |||
And I am logged in as "user1" | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
And I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I share "Shared folder" with "user1" | |||
And I act as John | |||
And I enter in the folder named "Shared folder" | |||
And I create a new folder named "Subfolder" | |||
And I see that the file list contains a file named "Subfolder" | |||
When I act as Jim | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I enter in the folder named "Shared folder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
Scenario: owner sees a folder created by the resharee in a shared folder | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as Jim | |||
And I am logged in as "user1" | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
And I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I share "Shared folder" with "user1" | |||
And I act as Jim | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I enter in the folder named "Shared folder" | |||
And I create a new folder named "Subfolder" | |||
And I see that the file list contains a file named "Subfolder" | |||
When I act as John | |||
And I enter in the folder named "Shared folder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
Scenario: sharee can not reshare a folder if the sharer disables it | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
And I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I set the share with "user0" as not reshareable | |||
And I see that "user0" can not reshare the share | |||
When I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
Then I see that the file list contains a file named "Shared folder" | |||
And I open the details view for "Shared folder" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that the file is shared with me by "admin" | |||
And I see that resharing the file is not allowed | |||
Scenario: sharee can not reshare a subfolder if the sharer disables it for the parent folder | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
And I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I set the share with "user0" as not reshareable | |||
And I see that "user0" can not reshare the share | |||
And I enter in the folder named "Shared folder" | |||
And I create a new folder named "Subfolder" | |||
And I see that the file list contains a file named "Subfolder" | |||
When I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I enter in the folder named "Shared folder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
And I open the details view for "Subfolder" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that resharing the file is not allowed |
@@ -147,422 +147,6 @@ Feature: app-files | |||
Then I see that the file list contains a file named "farewell.txt" | |||
And I see that the file name shown in the details view is "farewell.txt" | |||
Scenario: open the menu in a public shared link | |||
Given I act as John | |||
And I am logged in | |||
And I share the link for "welcome.txt" | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the shared link I wrote down | |||
And I open the Share menu | |||
Then I see that the Share menu is shown | |||
Scenario: hide download in a public shared link | |||
Given I act as John | |||
And I am logged in | |||
And I share the link for "welcome.txt" | |||
And I set the download of the shared link as hidden | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the shared link I wrote down | |||
Then I see that the download button is not shown | |||
And I see that the Share menu button is not shown | |||
Scenario: show download again in a public shared link | |||
Given I act as John | |||
And I am logged in | |||
And I share the link for "welcome.txt" | |||
And I set the download of the shared link as hidden | |||
And I set the download of the shared link as shown | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the shared link I wrote down | |||
Then I see that the download button is shown | |||
And I open the Share menu | |||
And I see that the Share menu is shown | |||
Scenario: creation is not possible by default in a public shared folder | |||
Given I act as John | |||
And I am logged in | |||
And I create a new folder named "Shared folder" | |||
# To share the link the "Share" inline action has to be clicked but, as the | |||
# details view is opened automatically when the folder is created, clicking | |||
# on the inline action could fail if it is covered by the details view due | |||
# to its opening animation. Instead of ensuring that the animations of the | |||
# contents and the details view have both finished it is easier to close the | |||
# details view and wait until it is closed before continuing. | |||
And I close the details view | |||
And I see that the details view is closed | |||
And I share the link for "Shared folder" | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the shared link I wrote down | |||
And I see that the file list is eventually loaded | |||
Then I see that it is not possible to create new files | |||
Scenario: create folder in a public editable shared folder | |||
Given I act as John | |||
And I am logged in | |||
And I create a new folder named "Editable shared folder" | |||
# To share the link the "Share" inline action has to be clicked but, as the | |||
# details view is opened automatically when the folder is created, clicking | |||
# on the inline action could fail if it is covered by the details view due | |||
# to its opening animation. Instead of ensuring that the animations of the | |||
# contents and the details view have both finished it is easier to close the | |||
# details view and wait until it is closed before continuing. | |||
And I close the details view | |||
And I see that the details view is closed | |||
And I share the link for "Editable shared folder" | |||
And I set the shared link as editable | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the shared link I wrote down | |||
And I create a new folder named "Subfolder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
Scenario: owner sees folder created in the public page of an editable shared folder | |||
Given I act as John | |||
And I am logged in | |||
And I create a new folder named "Editable shared folder" | |||
# To share the link the "Share" inline action has to be clicked but, as the | |||
# details view is opened automatically when the folder is created, clicking | |||
# on the inline action could fail if it is covered by the details view due | |||
# to its opening animation. Instead of ensuring that the animations of the | |||
# contents and the details view have both finished it is easier to close the | |||
# details view and wait until it is closed before continuing. | |||
And I close the details view | |||
And I see that the details view is closed | |||
And I share the link for "Editable shared folder" | |||
And I set the shared link as editable | |||
And I write down the shared link | |||
And I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the shared link I wrote down | |||
And I create a new folder named "Subfolder" | |||
And I see that the file list contains a file named "Subfolder" | |||
When I act as John | |||
And I enter in the folder named "Editable shared folder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
Scenario: set a password to a shared link | |||
Given I am logged in | |||
And I share the link for "welcome.txt" | |||
When I protect the shared link with the password "abcdef" | |||
Then I see that the working icon for password protect is shown | |||
And I see that the working icon for password protect is eventually not shown | |||
And I see that the link share is password protected | |||
# As Talk is not enabled in the acceptance tests of the server the checkbox | |||
# is never shown. | |||
And I see that the checkbox to protect the password of the link share by Talk is not shown | |||
Scenario: access a shared link protected by password with a valid password | |||
Given I act as John | |||
And I am logged in | |||
And I share the link for "welcome.txt" protected by the password "abcdef" | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I see that the current page is the Authenticate page for the shared link I wrote down | |||
And I authenticate with password "abcdef" | |||
Then I see that the current page is the shared link I wrote down | |||
And I see that the shared file preview shows the text "Welcome to your Nextcloud account!" | |||
Scenario: access a shared link protected by password with an invalid password | |||
Given I act as John | |||
And I am logged in | |||
And I share the link for "welcome.txt" protected by the password "abcdef" | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the shared link I wrote down | |||
And I authenticate with password "fedcba" | |||
Then I see that the current page is the Authenticate page for the shared link I wrote down | |||
And I see that a wrong password for the shared file message is shown | |||
Scenario: access a direct download shared link protected by password with a valid password | |||
Given I act as John | |||
And I am logged in | |||
And I share the link for "welcome.txt" protected by the password "abcdef" | |||
And I write down the shared link | |||
When I act as Jane | |||
And I visit the direct download shared link I wrote down | |||
And I see that the current page is the Authenticate page for the direct download shared link I wrote down | |||
And I authenticate with password "abcdef" | |||
# download starts no page redirection | |||
And I see that the current page is the Authenticate page for the direct download shared link I wrote down | |||
Scenario: share a file with another user | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I rename "welcome.txt" to "farewell.txt" | |||
And I see that the file list contains a file named "farewell.txt" | |||
When I share "farewell.txt" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
Then I see that the file list contains a file named "farewell.txt" | |||
And I open the details view for "farewell.txt" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that the file is shared with me by "admin" | |||
Scenario: share a file with another user who already has a file with that name | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
When I share "welcome.txt" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
Then I see that the file list contains a file named "welcome (2).txt" | |||
And I open the details view for "welcome (2).txt" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that the file is shared with me by "admin" | |||
Scenario: share a skeleton file with another user before first login | |||
# If a file is shared with a user before her first login the skeleton would | |||
# not have been created, so if the shared file has the same name as one from | |||
# the skeleton the shared file will take its place and the skeleton file | |||
# will not be added. | |||
Given I act as John | |||
And I am logged in as the admin | |||
When I share "welcome.txt" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
And I am logged in | |||
Then I see that the file list contains a file named "welcome.txt" | |||
And I open the details view for "welcome.txt" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that the file is shared with me by "admin" | |||
Scenario: reshare a file with another user | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as Jim | |||
And I am logged in as "user1" | |||
And I act as John | |||
And I rename "welcome.txt" to "farewell.txt" | |||
And I see that the file list contains a file named "farewell.txt" | |||
And I share "farewell.txt" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
When I share "farewell.txt" with "user1" | |||
And I see that the file is shared with "user1" | |||
And I act as Jim | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
Then I see that the file list contains a file named "farewell.txt" | |||
And I open the details view for "farewell.txt" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that the file is shared with me by "user0" | |||
Scenario: owner sees reshares with other users | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I rename "welcome.txt" to "farewell.txt" | |||
And I see that the file list contains a file named "farewell.txt" | |||
And I share "farewell.txt" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I share "farewell.txt" with "user1" | |||
And I see that the file is shared with "user1" | |||
When I act as John | |||
# The Files app is open again to reload the file list and the shares | |||
And I open the Files app | |||
And I open the details view for "farewell.txt" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
Then I see that the file is shared with "user0" | |||
And I see that the file is shared with "user1" | |||
Scenario: share an empty folder with another user | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
When I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
Then I see that the file list contains a file named "Shared folder" | |||
And I open the details view for "Shared folder" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that the file is shared with me by "admin" | |||
Scenario: sharee sees a folder created by the owner in a shared folder | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
And I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I enter in the folder named "Shared folder" | |||
And I create a new folder named "Subfolder" | |||
And I see that the file list contains a file named "Subfolder" | |||
When I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I enter in the folder named "Shared folder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
Scenario: owner sees a folder created by the sharee in a shared folder | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
And I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I enter in the folder named "Shared folder" | |||
And I create a new folder named "Subfolder" | |||
And I see that the file list contains a file named "Subfolder" | |||
When I act as John | |||
And I enter in the folder named "Shared folder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
Scenario: resharee sees a folder created by the owner in a shared folder | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as Jim | |||
And I am logged in as "user1" | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
And I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I share "Shared folder" with "user1" | |||
And I act as John | |||
And I enter in the folder named "Shared folder" | |||
And I create a new folder named "Subfolder" | |||
And I see that the file list contains a file named "Subfolder" | |||
When I act as Jim | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I enter in the folder named "Shared folder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
Scenario: owner sees a folder created by the resharee in a shared folder | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as Jim | |||
And I am logged in as "user1" | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
And I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I share "Shared folder" with "user1" | |||
And I act as Jim | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I enter in the folder named "Shared folder" | |||
And I create a new folder named "Subfolder" | |||
And I see that the file list contains a file named "Subfolder" | |||
When I act as John | |||
And I enter in the folder named "Shared folder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
Scenario: sharee can not reshare a folder if the sharer disables it | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
And I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I set the share with "user0" as not reshareable | |||
And I see that "user0" can not reshare the share | |||
When I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
Then I see that the file list contains a file named "Shared folder" | |||
And I open the details view for "Shared folder" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that the file is shared with me by "admin" | |||
And I see that resharing the file is not allowed | |||
Scenario: sharee can not reshare a subfolder if the sharer disables it for the parent folder | |||
Given I act as John | |||
And I am logged in as the admin | |||
And I act as Jane | |||
And I am logged in | |||
And I act as John | |||
And I create a new folder named "Shared folder" | |||
And I see that the file list contains a file named "Shared folder" | |||
And I share "Shared folder" with "user0" | |||
And I see that the file is shared with "user0" | |||
And I set the share with "user0" as not reshareable | |||
And I see that "user0" can not reshare the share | |||
And I enter in the folder named "Shared folder" | |||
And I create a new folder named "Subfolder" | |||
And I see that the file list contains a file named "Subfolder" | |||
When I act as Jane | |||
# The Files app is open again to reload the file list | |||
And I open the Files app | |||
And I enter in the folder named "Shared folder" | |||
Then I see that the file list contains a file named "Subfolder" | |||
And I open the details view for "Subfolder" | |||
And I see that the details view is open | |||
And I open the "Sharing" tab in the details view | |||
And I see that the "Sharing" tab in the details view is eventually loaded | |||
And I see that resharing the file is not allowed | |||
Scenario: marking a file as favorite causes the file list to be sorted again | |||
Given I am logged in | |||
And I create a new folder named "A name alphabetically lower than welcome.txt" |