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
diff options
context:
space:
mode:
authorSwoichha Adhikari <swoichhaa@gmail.com>2021-07-01 06:17:49 +0300
committerGitHub <noreply@github.com>2021-07-01 06:17:49 +0300
commitea03dab027840d112fa8e44a493c9aaaefa1fed1 (patch)
treea3eef98f85512a8b5624859941d6f177dbdb9f7b /test/gui/shared/steps
parentd25f15af24912a57a4b1b18524ff78b5a575d6a6 (diff)
[tests-only] change collaborator permissions (#8788)
Diffstat (limited to 'test/gui/shared/steps')
-rw-r--r--test/gui/shared/steps/steps.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/gui/shared/steps/steps.py b/test/gui/shared/steps/steps.py
index 674d464f8..d3ef1d9a8 100644
--- a/test/gui/shared/steps/steps.py
+++ b/test/gui/shared/steps/steps.py
@@ -646,3 +646,37 @@ def step(context):
def step(context):
for tabName in context.table:
test.vp(tabName[0])
+
+
+@When(
+ 'the user removes permissions "|any|" for user "|any|" of resource "|any|" using the client-UI'
+)
+def step(context, permissions, receiver, resource):
+ openSharingDialog(context, resource)
+ test.compare(
+ str(waitForObjectExists(names.scrollArea_sharedWith_QLabel).text), receiver
+ )
+
+ shareItem = SharingDialog()
+ shareItem.removePermissions(permissions)
+
+
+@When("the user closes the sharing dialog")
+def step(context):
+ clickButton(waitForObject(names.sharingDialog_Close_QPushButton))
+
+
+@Then(
+ '"|any|" permissions should not be displayed for user "|any|" for resource "|any|" on the client-UI'
+)
+def step(context, permissions, user, resource):
+ permissionsList = permissions.split(',')
+
+ shareItem = SharingDialog()
+ editChecked, shareChecked = shareItem.getAvailablePermission()
+
+ if 'edit' in permissionsList:
+ test.compare(editChecked, False)
+
+ if 'share' in permissionsList:
+ test.compare(shareChecked, False)