Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test/gui
diff options
context:
space:
mode:
authorSaw-jan Gurung <saw.jan.grg3e@gmail.com>2021-12-21 09:11:12 +0300
committerGitHub <noreply@github.com>2021-12-21 09:11:12 +0300
commit785cef7544cbff8d169b73705b9ecf9c409b6f10 (patch)
tree880e338bb8b19125da417ec99fe6b9f05ee0c318 /test/gui
parent913af8cc3a476fddbdc0d57d8d94ed4035de8bfb (diff)
add sharing test scenarios (#9190)
add new steps add new steps auto accept shares in Shares folder add another workaround to set public share expiration date fix file overwriting test step address reviews add comments accept shares in root
Diffstat (limited to 'test/gui')
-rw-r--r--test/gui/shared/scripts/pageObjects/PublicLinkDialog.py144
-rw-r--r--test/gui/shared/scripts/pageObjects/SharingDialog.py34
-rw-r--r--test/gui/shared/steps/steps.py116
-rw-r--r--test/gui/tst_sharing/test.feature165
4 files changed, 382 insertions, 77 deletions
diff --git a/test/gui/shared/scripts/pageObjects/PublicLinkDialog.py b/test/gui/shared/scripts/pageObjects/PublicLinkDialog.py
index ea7af0ea3..6b6196e65 100644
--- a/test/gui/shared/scripts/pageObjects/PublicLinkDialog.py
+++ b/test/gui/shared/scripts/pageObjects/PublicLinkDialog.py
@@ -22,6 +22,18 @@ class PublicLinkDialog:
"type": "QCheckBox",
"visible": 1,
}
+ PASSWORD_INPUT_FIELD = {
+ "container": names.qt_tabwidget_stackedwidget_OCC_ShareLinkWidget_OCC_ShareLinkWidget,
+ "name": "lineEdit_password",
+ "type": "QLineEdit",
+ "visible": 1,
+ }
+ EXPIRYDATE_CHECKBOX = {
+ "container": names.qt_tabwidget_stackedwidget_OCC_ShareLinkWidget_OCC_ShareLinkWidget,
+ "name": "checkBox_expire",
+ "type": "QCheckBox",
+ "visible": 1,
+ }
CREATE_SHARE_BUTTON = {
"container": names.qt_tabwidget_stackedwidget_OCC_ShareLinkWidget_OCC_ShareLinkWidget,
"name": "createShareButton",
@@ -69,7 +81,9 @@ class PublicLinkDialog:
squish.Qt.LeftButton,
)
- def createPublicLink(self, context, resource, password='', permissions=''):
+ def createPublicLink(
+ self, context, resource, password='', permissions='', expireDate='', linkName=''
+ ):
radioObjectName = ''
if permissions:
radioObjectName = self.getRadioObjectForPermssion(permissions)
@@ -86,18 +100,13 @@ class PublicLinkDialog:
squish.clickButton(squish.waitForObject(radioObjectName))
if password:
- squish.clickButton(squish.waitForObject(self.PASSWORD_CHECKBOX))
- squish.mouseClick(
- squish.waitForObject(self.PASSWORD_CHECKBOX),
- 0,
- 0,
- squish.Qt.NoModifier,
- squish.Qt.LeftButton,
- )
- squish.type(
- squish.waitForObject(self.PASSWORD_CHECKBOX),
- password,
- )
+ self.setPassword(password)
+
+ if expireDate:
+ self.setExpirationDate(expireDate)
+
+ if linkName:
+ self.setLinkName(linkName)
squish.clickButton(squish.waitForObject(self.CREATE_SHARE_BUTTON))
squish.waitFor(
@@ -107,22 +116,35 @@ class PublicLinkDialog:
)
)
- def togglesPassword(self):
+ def togglePassword(self):
squish.clickButton(squish.waitForObject(self.PASSWORD_CHECKBOX))
- def setExpirationDate(self, context, publicLinkName, resource):
- test.compare(
- str(squish.waitForObjectExists(self.ITEM_TO_SHARE).text),
- resource,
+ def setPassword(self, password):
+ enabled = squish.waitForObjectExists(self.PASSWORD_CHECKBOX).checked
+ if not enabled:
+ self.togglePassword()
+
+ squish.mouseClick(
+ squish.waitForObject(self.PASSWORD_INPUT_FIELD),
+ 0,
+ 0,
+ squish.Qt.NoModifier,
+ squish.Qt.LeftButton,
)
- test.compare(
- str(squish.waitForObjectExists(self.PUBLIC_LINK_NAME).text),
- publicLinkName,
+ squish.type(
+ squish.waitForObject(self.PASSWORD_INPUT_FIELD),
+ password,
)
- expDate = []
- for row in context.table:
- if row[0] == 'expireDate':
- expDate = datetime.datetime.strptime(row[1], '%Y-%m-%d')
+
+ def toggleExpirationDate(self):
+ squish.clickButton(squish.waitForObject(self.EXPIRYDATE_CHECKBOX))
+
+ def setExpirationDate(self, expireDate):
+ enabled = squish.waitForObjectExists(self.EXPIRYDATE_CHECKBOX).checked
+ if not enabled:
+ self.toggleExpirationDate()
+
+ expDate = datetime.datetime.strptime(expireDate, '%Y-%m-%d')
expYear = expDate.year - 2000
squish.mouseClick(
squish.waitForObject(self.EXPIRATION_DATE_FIELD),
@@ -137,17 +159,49 @@ class PublicLinkDialog:
squish.nativeType(expDate.day)
squish.nativeType(expYear)
squish.nativeType("<Return>")
- squish.testSettings.silentVerifications = True
+
+ actualDate = squish.waitForObjectExists(self.EXPIRATION_DATE_FIELD).displayText
+ expectedDate = f"{expDate.month}/{expDate.day}/{expYear}"
+ if not actualDate == expectedDate:
+ # retry with workaround
+ self.setExpirationDateWithWorkaround(expYear, expDate.month, expDate.day)
+
squish.waitFor(
- lambda: (test.xvp("publicLinkExpirationProgressIndicatorInvisible"))
+ lambda: (test.vp("publicLinkExpirationProgressIndicatorInvisible"))
)
- waitFor(lambda: (test.vp("publicLinkExpirationProgressIndicatorInvisible")))
- squish.testSettings.silentVerifications = False
test.compare(
str(squish.waitForObjectExists(self.EXPIRATION_DATE_FIELD).displayText),
- str(expDate.month) + "/" + str(expDate.day) + "/" + str(expYear),
+ str(expectedDate),
+ )
+
+ # This workaround is needed because the above function 'setExpirationDate'
+ # will not work while creating new public link
+ # See for more details: https://github.com/owncloud/client/issues/9218
+ def setExpirationDateWithWorkaround(self, year, month, day):
+ squish.mouseClick(
+ squish.waitForObject(self.EXPIRATION_DATE_FIELD),
+ 0,
+ 0,
+ squish.Qt.NoModifier,
+ squish.Qt.LeftButton,
)
+ # date can be edited from backward only
+ # date format is 'mm/dd/yy', so we have to edit 'year' first
+ # then 'day' and then 'month'.
+ # Move the cursor to year field
+ squish.nativeType("<Ctrl+Right>")
+ squish.nativeType("<Ctrl+Right>")
+ squish.nativeType(year)
+ # Move the cursor to day field
+ squish.nativeType("<Ctrl+Left>")
+ squish.nativeType(day)
+ # Move the cursor to month field
+ squish.nativeType("<Ctrl+Left>")
+ squish.nativeType("<Ctrl+Left>")
+ squish.nativeType(month)
+ squish.nativeType("<Return>")
+
def getRadioObjectForPermssion(self, permissions):
radioObjectName = ''
if permissions == 'Download / View' or permissions == 'Viewer':
@@ -173,24 +227,22 @@ class PublicLinkDialog:
)
)
- def changePassword(self, publicLinkName, password):
- test.compare(
- str(squish.waitForObjectExists(self.PUBLIC_LINK_NAME).text),
- publicLinkName,
- )
- squish.mouseClick(
- squish.waitForObject(names.oCC_ShareLinkWidget_lineEdit_password_QLineEdit),
- 0,
- 0,
- squish.Qt.NoModifier,
- squish.Qt.LeftButton,
- )
- squish.type(
- squish.waitForObject(names.oCC_ShareLinkWidget_lineEdit_password_QLineEdit),
- password,
- )
+ def changePassword(self, password):
+ self.setPassword(password)
squish.clickButton(
squish.waitForObject(
names.oCC_ShareLinkWidget_pushButton_setPassword_QPushButton
)
)
+
+ def verifyPublicLinkName(self, publicLinkName):
+ test.compare(
+ str(squish.waitForObjectExists(self.PUBLIC_LINK_NAME).text),
+ publicLinkName,
+ )
+
+ def verifyResource(self, resource):
+ test.compare(
+ str(squish.waitForObjectExists(self.ITEM_TO_SHARE).text),
+ resource,
+ )
diff --git a/test/gui/shared/scripts/pageObjects/SharingDialog.py b/test/gui/shared/scripts/pageObjects/SharingDialog.py
index 79388926f..e5008bba7 100644
--- a/test/gui/shared/scripts/pageObjects/SharingDialog.py
+++ b/test/gui/shared/scripts/pageObjects/SharingDialog.py
@@ -59,6 +59,19 @@ class SharingDialog:
return editChecked, shareChecked
+ def searchCollaborator(self, collaborator):
+ squish.mouseClick(
+ squish.waitForObject(self.SHARE_WITH_COLLABORATOR_INPUT_FIELD),
+ 0,
+ 0,
+ squish.Qt.NoModifier,
+ squish.Qt.LeftButton,
+ )
+ squish.type(
+ squish.waitForObject(self.SHARE_WITH_COLLABORATOR_INPUT_FIELD),
+ collaborator,
+ )
+
def addCollaborator(self, receiver, permissions, isGroup=False):
self.selectCollaborator(receiver, isGroup)
permissionsList = permissions.split(",")
@@ -85,20 +98,17 @@ class SharingDialog:
if isGroup:
postFixInSuggestion = " (group)"
- squish.mouseClick(
- squish.waitForObject(self.SHARE_WITH_COLLABORATOR_INPUT_FIELD),
- 0,
- 0,
- squish.Qt.NoModifier,
- squish.Qt.LeftButton,
- )
- squish.type(
- squish.waitForObject(self.SHARE_WITH_COLLABORATOR_INPUT_FIELD),
- receiver,
- )
+ self.searchCollaborator(receiver)
+
+ # collaborator name with special characters contains escape characters '\\'
+ # in the squish object
+ # Example:
+ # Actual collaborator name: Speci@l_Name-.+
+ # Collaborator name in object: Speci@l\\_Name-\\.+
+ escapedReceiverName = receiver.replace("_", "\\_").replace(".", "\\.")
squish.mouseClick(
squish.waitForObjectItem(
- self.SUGGESTED_COLLABORATOR, receiver + postFixInSuggestion
+ self.SUGGESTED_COLLABORATOR, escapedReceiverName + postFixInSuggestion
),
0,
0,
diff --git a/test/gui/shared/steps/steps.py b/test/gui/shared/steps/steps.py
index 3f0df5da4..097d92101 100644
--- a/test/gui/shared/steps/steps.py
+++ b/test/gui/shared/steps/steps.py
@@ -257,6 +257,15 @@ def step(context, resource):
@When(
+ 'the user selects "|any|" as collaborator of resource "|any|" using the client-UI'
+)
+def step(context, receiver, resource):
+ openSharingDialog(context, resource)
+ shareItem = SharingDialog()
+ shareItem.selectCollaborator(receiver)
+
+
+@When(
'the user adds group "|any|" as collaborator of resource "|any|" with permissions "|any|" using the client-UI'
)
def step(context, receiver, resource, permissions):
@@ -612,7 +621,7 @@ def step(context, resource):
@When("the user toggles the password protection using the client-UI")
def step(context):
publicLinkDialog = PublicLinkDialog()
- publicLinkDialog.togglesPassword()
+ publicLinkDialog.togglePassword()
@Then('the password progress indicator should not be visible in the client-UI')
@@ -656,12 +665,16 @@ def step(context, fileShareContext):
)
-def createPublicLinkShare(context, resource, password='', permissions=''):
+def createPublicLinkShare(
+ context, resource, password='', permissions='', expireDate='', name=''
+):
resource = getResourcePath(context, resource)
openSharingDialog(context, resource)
publicLinkDialog = PublicLinkDialog()
publicLinkDialog.openPublicLinkDialog()
- publicLinkDialog.createPublicLink(context, resource, password, permissions)
+ publicLinkDialog.createPublicLink(
+ context, resource, password, permissions, expireDate, name
+ )
@When(
@@ -678,10 +691,21 @@ def step(context, resource, password):
createPublicLinkShare(context, resource, password)
+def setExpirationDateWithVerification(resource, publicLinkName, expireDate):
+ publicLinkDialog = PublicLinkDialog()
+ publicLinkDialog.verifyResource(resource)
+ publicLinkDialog.verifyPublicLinkName(publicLinkName)
+ publicLinkDialog.setExpirationDate(expireDate)
+
+
@When('the user edits the public link named "|any|" of file "|any|" changing following')
def step(context, publicLinkName, resource):
- publicLinkDialog = PublicLinkDialog()
- publicLinkDialog.setExpirationDate(context, publicLinkName, resource)
+ expireDate = ''
+ for row in context.table:
+ if row[0] == 'expireDate':
+ expireDate = row[1]
+ break
+ setExpirationDateWithVerification(resource, publicLinkName, expireDate)
@When(
@@ -698,6 +722,19 @@ def step(context, permissions, resource, password):
createPublicLinkShare(context, resource, password, permissions)
+@When('the user creates a new public link with following settings using the client-UI:')
+def step(context):
+ linkSettings = {}
+ for row in context.table:
+ linkSettings[row[0]] = row[1]
+ createPublicLinkShare(
+ context,
+ resource=linkSettings['path'],
+ password=linkSettings['password'],
+ expireDate=linkSettings['expireDate'],
+ )
+
+
def createPublicShareWithRole(context, resource, role):
resource = sanitizePath(substituteInLineCodes(context, resource))
openSharingDialog(context, resource)
@@ -916,6 +953,21 @@ def step(context, resource, content):
waitForFileToBeSynced(context, resource)
+@When('the user tries to overwrite the file "|any|" with content "|any|"')
+def step(context, resource, content):
+ waitForFileToBeSynced(context, resource)
+ waitForFolderToBeSynced(context, '/')
+
+ try:
+ f = open(context.userData['currentUserSyncPath'] + resource, "w")
+ f.write(content)
+ f.close()
+ except:
+ pass
+
+ waitForFileToBeSynced(context, resource)
+
+
def enableVFSSupport(vfsBtnText):
# The enabling/disabling VFS button do not have it's own object
# But it is inside the "stack_folderList_QTreeView" object.
@@ -1146,7 +1198,8 @@ def step(context, resource):
)
def step(context, publicLinkName, password):
publicLinkDialog = PublicLinkDialog()
- publicLinkDialog.changePassword(publicLinkName, password)
+ publicLinkDialog.verifyPublicLinkName(publicLinkName)
+ publicLinkDialog.changePassword(password)
@Then(
@@ -1164,3 +1217,54 @@ def step(context, resource):
context, receiver, resource, permissions, receiverCount
)
receiverCount += 1
+
+
+def searchCollaborator(collaborator):
+ shareItem = SharingDialog()
+ shareItem.searchCollaborator(collaborator)
+
+
+@When('the user searches for collaborator "|any|" using the client-UI')
+def step(context, collaborator):
+ searchCollaborator(collaborator)
+
+
+@When(
+ 'the user searches for collaborator with autocomplete characters "|any|" using the client-UI'
+)
+def step(context, collaborator):
+ searchCollaborator(collaborator)
+
+
+@Then('the following users should be listed as suggested collaborators:')
+def step(context):
+ shareItem = SharingDialog()
+ for collaborator in context.table[1:]:
+ exists = False
+ try:
+ waitForObjectItem(shareItem.SUGGESTED_COLLABORATOR, collaborator[0])
+ exists = True
+ except LookupError as e:
+ pass
+
+ test.compare(exists, True, "Assert user '" + collaborator[0] + "' is listed")
+
+
+@Then('the collaborators should be listed in the following order:')
+def step(context):
+ shareItem = SharingDialog()
+ for index, collaborator in enumerate(context.table[1:], start=1):
+ test.compare(
+ str(
+ waitForObjectExists(
+ {
+ "container": names.sharingDialogUG_scrollArea_QScrollArea,
+ "name": "sharedWith",
+ "occurrence": index,
+ "type": "QLabel",
+ "visible": 1,
+ }
+ ).text
+ ),
+ collaborator[0],
+ )
diff --git a/test/gui/tst_sharing/test.feature b/test/gui/tst_sharing/test.feature
index fd06e258c..12cb4d7aa 100644
--- a/test/gui/tst_sharing/test.feature
+++ b/test/gui/tst_sharing/test.feature
@@ -9,12 +9,27 @@ Feature: Sharing
Given user "Alice" has been created on the server with default attributes and without skeleton files
@smokeTest
- Scenario: simple sharing
+ Scenario: simple sharing with user
Given user "Brian" has been created on the server with default attributes and without skeleton files
+ And user "Alice" has created folder "simple-folder" on the server
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt" on the server
And user "Alice" has set up a client with default settings
When the user adds "Brian Murphy" as collaborator of resource "textfile0.txt" with permissions "edit,share" using the client-UI
+ And the user adds "Brian Murphy" as collaborator of resource "simple-folder" with permissions "edit,share" using the client-UI
Then user "Brian Murphy" should be listed in the collaborators list for file "textfile0.txt" with permissions "edit,share" on the client-UI
+ And user "Brian Murphy" should be listed in the collaborators list for file "simple-folder" with permissions "edit,share" on the client-UI
+
+
+ Scenario: sharing file/folder with a user that has special characters as username
+ Given user "Speci@l_Name-.+" has been created on the server with default attributes and without skeleton files
+ And user "Alice" has created folder "FOLDER" on the server
+ And user "Alice" has uploaded file with content "ownCloud test text file" to "textfile.txt" on the server
+ And user "Alice" has set up a client with default settings
+ When the user opens the sharing dialog of "textfile.txt" using the client-UI
+ And the user adds "Speci@l_Name-.+" as collaborator of resource "textfile.txt" with permissions "edit,share" using the client-UI
+ And the user adds "Speci@l_Name-.+" as collaborator of resource "FOLDER" with permissions "edit,share" using the client-UI
+ Then user "Speci@l_Name-.+" should be listed in the collaborators list for file "textfile.txt" with permissions "edit,share" on the client-UI
+ And user "Speci@l_Name-.+" should be listed in the collaborators list for file "FOLDER" with permissions "edit,share" on the client-UI
Scenario: Share files/folders with special characters in their name
@@ -27,6 +42,52 @@ Feature: Sharing
Then user "Brian Murphy" should be listed in the collaborators list for file "SampleFolder,With,$pecial?Characters" with permissions "edit,share" on the client-UI
And user "Brian Murphy" should be listed in the collaborators list for file "$ample1?.txt" with permissions "edit,share" on the client-UI
+
+ Scenario: try to share a file with a user to whom the file has already been shared
+ Given user "Brian" has been created on the server with default attributes and without skeleton files
+ And user "Alice" has uploaded file with content "ownCloud test text file" to "/textfile.txt" on the server
+ And user "Alice" has shared file "textfile.txt" on the server with user "Brian" with "all" permissions
+ And user "Alice" has set up a client with default settings
+ When the user opens the sharing dialog of "textfile.txt" using the client-UI
+ And the user searches for collaborator "Brian Murphy" using the client-UI
+ Then the error "No results for 'Brian Murphy'" should be displayed
+
+
+ Scenario: try to self share a file
+ Given user "Alice" has uploaded file with content "ownCloud test text file" to "/textfile.txt" on the server
+ And user "Alice" has set up a client with default settings
+ When the user opens the sharing dialog of "textfile.txt" using the client-UI
+ And the user selects "Alice Hansen" as collaborator of resource "textfile.txt" using the client-UI
+ Then the error "Can't share with yourself" should be displayed
+
+
+ Scenario: search for users with minimum autocomplete characters
+ Given user "TestUser1" has been created on the server with default attributes and without skeleton files
+ And user "TestUser2" has been created on the server with default attributes and without skeleton files
+ And user "Alice" has uploaded file with content "ownCloud test text file" to "textfile.txt" on the server
+ And user "Alice" has set up a client with default settings
+ When the user opens the sharing dialog of "textfile.txt" using the client-UI
+ And the user searches for collaborator with autocomplete characters "Tes" using the client-UI
+ Then the following users should be listed as suggested collaborators:
+ | user |
+ | TestUser1 |
+ | TestUser2 |
+
+
+ Scenario: collaborators are listed in chronological order
+ Given user "Brian" has been created on the server with default attributes and without skeleton files
+ And user "Carol" has been created on the server with default attributes and without skeleton files
+ And user "Alice" has uploaded file with content "ownCloud test text file" to "textfile.txt" on the server
+ And user "Alice" has shared file "textfile.txt" on the server with user "Carol" with "all" permissions
+ And user "Alice" has shared file "textfile.txt" on the server with user "Brian" with "all" permissions
+ And user "Alice" has set up a client with default settings
+ When the user opens the sharing dialog of "textfile.txt" using the client-UI
+ Then the collaborators should be listed in the following order:
+ | collaborator |
+ | Carol King |
+ | Brian Murphy |
+
+
@issue-7459
Scenario: Progress indicator should not be visible after unselecting the password protection checkbox while sharing through public link
Given user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt" on the server
@@ -77,6 +138,36 @@ Feature: Sharing
And as "Alice" the file "simple-folder/textfile.txt" on the server should have the content "overwrite ownCloud test text file"
+ Scenario: sharee creates a file and a folder inside a shared folder
+ Given user "Alice" has created folder "Parent" on the server
+ And user "Brian" has been created on the server with default attributes and without skeleton files
+ And user "Alice" has shared folder "Parent" on the server with user "Brian" with "all" permissions
+ And user "Brian" has set up a client with default settings
+ When the user waits for folder "Parent" to be synced
+ And user "Brian" creates a file "Parent/localFile.txt" with the following content inside the sync folder
+ """
+ test content
+ """
+ And user "Brian" creates a folder "Parent/localFolder" inside the sync folder
+ And the user waits for file "Parent/localFile.txt" to be synced
+ And the user waits for folder "Parent/localFolder" to be synced
+ Then as "Brian" file "Parent/localFile.txt" should exist on the server
+ And as "Brian" folder "Parent/localFolder" should exist on the server
+ And as "Alice" file "Parent/localFile.txt" should exist on the server
+ And as "Alice" folder "Parent/localFolder" should exist on the server
+
+
+ Scenario: sharee tries to edit content of a file inside of a shared folder without write permission
+ Given user "Alice" has created folder "Parent" on the server
+ And user "Alice" has uploaded file with content "ownCloud test text file" to "Parent/textfile.txt" on the server
+ And user "Brian" has been created on the server with default attributes and without skeleton files
+ And user "Alice" has shared folder "Parent" on the server with user "Brian" with "read" permissions
+ And user "Brian" has set up a client with default settings
+ When the user tries to overwrite the file "Parent/textfile.txt" with content "overwrite ownCloud test text file"
+ Then as "Brian" the file "Parent/textfile.txt" on the server should have the content "ownCloud test text file"
+ And as "Alice" the file "Parent/textfile.txt" on the server should have the content "ownCloud test text file"
+
+
Scenario: sharee edits content of a file shared by sharer
Given user "Alice" has uploaded file with content "ownCloud test text file 0" to "textfile.txt" on the server
And user "Brian" has been created on the server with default attributes and without skeleton files
@@ -87,6 +178,44 @@ Feature: Sharing
And as "Alice" the file "textfile.txt" on the server should have the content "overwrite ownCloud test text file"
+ Scenario: sharee tries to edit a file shared without write permission
+ Given user "Brian" has been created on the server with default attributes and without skeleton files
+ And user "Alice" has uploaded file with content "ownCloud test text file" to "textfile.txt" on the server
+ And user "Alice" has shared file "textfile.txt" on the server with user "Brian" with "read" permissions
+ And user "Brian" has set up a client with default settings
+ When the user tries to overwrite the file "textfile.txt" with content "overwrite ownCloud test text file"
+ Then as "Brian" the file "textfile.txt" on the server should have the content "ownCloud test text file"
+ And as "Alice" the file "textfile.txt" on the server should have the content "ownCloud test text file"
+
+
+ Scenario: reshare a file/folder
+ Given user "Brian" has been created on the server with default attributes and without skeleton files
+ And user "Carol" has been created on the server with default attributes and without skeleton files
+ And user "Alice" has created folder "FOLDER" on the server
+ And user "Alice" has uploaded file with content "ownCloud test text file" to "textfile.txt" on the server
+ And user "Alice" has shared file "FOLDER" on the server with user "Brian" with "all" permissions
+ And user "Alice" has shared file "textfile.txt" on the server with user "Brian" with "all" permissions
+ And user "Brian" has set up a client with default settings
+ When the user adds "Carol King" as collaborator of resource "FOLDER" with permissions "edit,share" using the client-UI
+ And the user adds "Carol King" as collaborator of resource "textfile.txt" with permissions "edit,share" using the client-UI
+ Then user "Carol King" should be listed in the collaborators list for file "FOLDER" with permissions "edit,share" on the client-UI
+ And user "Carol King" should be listed in the collaborators list for file "textfile.txt" with permissions "edit,share" on the client-UI
+
+
+ Scenario: try to reshare a file/folder shared without share permission
+ Given user "Brian" has been created on the server with default attributes and without skeleton files
+ And user "Carol" has been created on the server with default attributes and without skeleton files
+ And user "Alice" has created folder "FOLDER" on the server
+ And user "Alice" has uploaded file with content "ownCloud test text file" to "textfile.txt" on the server
+ And user "Alice" has shared file "FOLDER" on the server with user "Brian" with "read" permissions
+ And user "Alice" has shared file "textfile.txt" on the server with user "Brian" with "read" permissions
+ And user "Brian" has set up a client with default settings
+ When the user opens the sharing dialog of "FOLDER" using the client-UI
+ Then the error text "The file can not be shared because it was shared without sharing permission." should be displayed in the sharing dialog
+ When the user opens the sharing dialog of "textfile.txt" using the client-UI
+ Then the error text "The file can not be shared because it was shared without sharing permission." should be displayed in the sharing dialog
+
+
Scenario: unshare a shared file
Given user "Brian" has been created on the server with default attributes and without skeleton files
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "textfile0.txt" on the server
@@ -128,18 +257,14 @@ Feature: Sharing
@issue-7423
Scenario: unshare a reshared file
- Given the setting "shareapi_auto_accept_share" on the server of app "core" has been set to "no"
- And the administrator on the server has set the default folder for received shares to "Shares"
- And user "Alice" has created folder "simple-folder" on the server
+ Given user "Alice" has uploaded file with content "ownCloud test text file" to "textfile.txt" on the server
And user "Brian" has been created on the server with default attributes and without skeleton files
And user "Carol" has been created on the server with default attributes and without skeleton files
- And user "Alice" has shared folder "simple-folder" on the server with user "Brian"
- And user "Brian" has accepted the share "simple-folder" on the server offered by user "Alice"
- And user "Brian" has shared folder "Shares/simple-folder" on the server with user "Carol"
+ And user "Alice" has shared folder "textfile.txt" on the server with user "Brian"
+ And user "Brian" has shared folder "textfile.txt" on the server with user "Carol"
And user "Brian" has set up a client with default settings
- And user "Alice" has updated the share permissions on the server for folder "/simple-folder" to "read" for user "Brian"
- When the user opens the sharing dialog of "Shares/simple-folder" using the client-UI
- Then the error text "The file can not be shared because it was shared without sharing permission." should be displayed in the sharing dialog
+ When the user unshares the resource "textfile.txt" for collaborator "Carol King" using the client-UI
+ Then the text "The item is not shared with any users or groups" should be displayed in the sharing dialog
@smokeTest
Scenario: simple sharing of a file by public link without password
@@ -167,9 +292,9 @@ Feature: Sharing
Then as user "Alice" the file "textfile0.txt" should have a public link on the server
And the public should be able to download the file "textfile0.txt" with password "<password>" from the last created public link by "Alice" on the server
Examples:
- | password |
- |password1234|
- | p@$s!23 |
+ | password |
+ | password1234 |
+ | p@$s!23 |
Scenario: sharing of a file by public link with password and changing the password
@@ -185,6 +310,20 @@ Feature: Sharing
And the public should be able to download the file "textfile0.txt" with password "password1234" from the last created public link by "Alice" on the server
+
+ Scenario: simple sharing of a file by public link with password and expiration date
+ Given user "Alice" has set up a client with default settings
+ And user "Alice" has uploaded file with content "ownCloud test text file" to "/textfile.txt" on the server
+ When the user creates a new public link with following settings using the client-UI:
+ | path | textfile.txt |
+ | password | pass123 |
+ | expireDate | 2031-10-14 |
+ Then as user "Alice" the file "textfile.txt" should have a public link on the server
+ And the fields of the last public link share response of user "Alice" should include on the server
+ | expireDate | 2031-10-14 |
+ And the public should be able to download the file "textfile.txt" with password "pass123" from the last created public link by "Alice" on the server
+
+
@issue-8733
Scenario: user changes the expiration date of an already existing public link using webUI
Given user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt" on the server