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:
authorSwoichha Adhikari <swoichhaa@gmail.com>2021-08-02 09:02:42 +0300
committerGitHub <noreply@github.com>2021-08-02 09:02:42 +0300
commit6882ece9dacc90b6da370ac23b20d5be03d06542 (patch)
treec09ac57d68891670c83044c4a0b7dde236f5d4e2 /test/gui
parent89a8085876c9e178425d4ccb1592adb5394c3150 (diff)
[tests-only] refactor steps (#8845)
Diffstat (limited to 'test/gui')
-rw-r--r--test/gui/shared/steps/steps.py20
-rw-r--r--test/gui/tst_sharing/test.feature6
2 files changed, 7 insertions, 19 deletions
diff --git a/test/gui/shared/steps/steps.py b/test/gui/shared/steps/steps.py
index b53d16dd5..d90dd56ef 100644
--- a/test/gui/shared/steps/steps.py
+++ b/test/gui/shared/steps/steps.py
@@ -261,10 +261,7 @@ def collaboratorShouldBeListed(context, receiver, resource, permissions):
@When('the user waits for the files to sync')
def step(context):
- waitFor(
- lambda: isFolderSynced(context.userData['clientSyncPath']),
- context.userData['clientSyncTimeout'] * 1000,
- )
+ waitForFolderToBeSynced(context, '/')
@When('the user waits for file "|any|" to be synced')
@@ -326,10 +323,7 @@ def step(context, filePath):
@Given('the user has paused the file sync')
def step(context):
- waitFor(
- lambda: isFolderSynced(context.userData['clientSyncPath']),
- context.userData['clientSyncTimeout'] * 1000,
- )
+ waitForFolderToBeSynced(context, '/')
syncWizard = SyncWizard()
syncWizard.performAction("Pause sync")
@@ -606,10 +600,7 @@ def step(context, username):
@Given('user "|any|" has logged out of the client-UI')
def step(context, username):
- waitFor(
- lambda: isFolderSynced(context.userData['clientSyncPath']),
- context.userData['clientSyncTimeout'] * 1000,
- )
+ waitForFolderToBeSynced(context, '/')
# TODO: find some way to dynamically to check if files are synced
# It might take some time for all files to sync
snooze(5)
@@ -651,10 +642,7 @@ def step(context, username, host):
)
)
- waitFor(
- lambda: isFolderSynced(context.userData['clientSyncPath']),
- context.userData['clientSyncTimeout'] * 1000,
- )
+ waitForFolderToBeSynced(context, '/')
accountStatus = AccountStatus()
accountStatus.removeConnection()
diff --git a/test/gui/tst_sharing/test.feature b/test/gui/tst_sharing/test.feature
index 275cc69ae..22504f1ec 100644
--- a/test/gui/tst_sharing/test.feature
+++ b/test/gui/tst_sharing/test.feature
@@ -28,7 +28,7 @@ Feature: Sharing
Scenario: Collaborator should not see to whom a file is shared.
Given user "Brian" has been created on the server with default attributes and without skeleton files
- And user "Alice" has uploaded on the server file with content "ownCloud test text file 0" to "/textfile0.txt"
+ And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt" on the server
And user "Alice" has shared file "/textfile0.txt" on the server with user "Brian" with "read, share" permission
And user "Brian" has set up a client with default settings
When user "Brian" opens the sharing dialog of "%client_sync_path%/textfile0.txt" using the client-UI
@@ -37,7 +37,7 @@ Feature: Sharing
Scenario: Group sharing
Given group "grp1" has been created on the server
- And user "Alice" has uploaded on the server file with content "ownCloud test text file 0" to "/textfile0.txt"
+ 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 group "grp1" as collaborator of resource "%client_sync_path%/textfile0.txt" with permissions "edit,share" using the client-UI
Then group "grp1" should be listed in the collaborators list for file "%client_sync_path%/textfile0.txt" with permissions "edit,share" on the client-UI
@@ -47,7 +47,7 @@ Feature: Sharing
Given user "Brian" has been created on the server with default attributes and without skeleton files
And group "grp1" has been created on the server
And user "Brian" on the server has been added to group "grp1"
- And user "Alice" has uploaded on the server file with content "ownCloud test text file 0" to "/textfile0.txt"
+ And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt" on the server
And user "Alice" has shared file "/textfile0.txt" on the server with user "Brian" with "read, share, update" permission
And user "Alice" has shared file "/textfile0.txt" on the server with group "grp1" with "read, share, update" permission
And user "Brian" has set up a client with default settings