diff options
author | Swoichha Adhikari <swoichhaa@gmail.com> | 2021-10-26 11:52:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-26 11:52:46 +0300 |
commit | 4479ec828b6d7ee497147c7f4120c02dcf897360 (patch) | |
tree | 637bdfdc8cf16412f010f48460f00c464dd5daa8 /test/gui/shared/steps | |
parent | 226f276ed7bc8dc1ba36cc11ee70329aa36e3fd4 (diff) |
[tests-only] add tests for files/folder share (#9162)
Diffstat (limited to 'test/gui/shared/steps')
-rw-r--r-- | test/gui/shared/steps/steps.py | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/test/gui/shared/steps/steps.py b/test/gui/shared/steps/steps.py index 47eafa570..ee7db0304 100644 --- a/test/gui/shared/steps/steps.py +++ b/test/gui/shared/steps/steps.py @@ -266,7 +266,6 @@ def collaboratorShouldBeListed(context, receiver, resource, permissions): socketConnect = syncstate.SocketConnect() socketConnect.sendCommand("SHARE:" + resource + "\n") permissionsList = permissions.split(',') - test.compare( str(waitForObjectExists(names.scrollArea_sharedWith_QLabel).text), receiver ) @@ -496,10 +495,24 @@ def step(context, receiver, resource): openSharingDialog(context, resource, 'folder') -@Then('the error text "|any|" should be displayed in the sharing dialog') -def step(context, fileShareContext): +def getSharingDialogText(): shareItem = SharingDialog() errorText = shareItem.getSharingDialogMessage() + return errorText + + +@Then('the text "|any|" should be displayed in the sharing dialog') +def step(context, fileShareContext): + errorText = getSharingDialogText() + test.compare( + errorText, + fileShareContext, + ) + + +@Then('the error text "|any|" should be displayed in the sharing dialog') +def step(context, fileShareContext): + errorText = getSharingDialogText() test.compare( errorText, fileShareContext, @@ -860,3 +873,14 @@ def step(context, itemType, resource): shutil.rmtree(resourcePath) else: raise Exception("No such item type for resource") + + +@When( + 'the user unshares the resource "|any|" for collaborator "|any|" using the client-UI' +) +def step(context, resource, receiver): + openSharingDialog(context, resource) + test.compare( + str(waitForObjectExists(names.scrollArea_sharedWith_QLabel).text), receiver + ) + clickButton(waitForObject(names.scrollArea_deleteShareButton_QToolButton)) |