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:
authorSwikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>2021-05-21 11:13:22 +0300
committerGitHub <noreply@github.com>2021-05-21 11:13:22 +0300
commit05a51a0dcae058a630ecb0453214744c8175aff1 (patch)
treeb5c590a4bcac6527c83820c502f345d05c2473fb /test/gui/shared
parenteffd2f7897d7a4d0245b6c08766ba1d0d3ba1189 (diff)
[tests-only] Set polling interval by default (#8646)
Diffstat (limited to 'test/gui/shared')
-rw-r--r--test/gui/shared/steps/steps.py33
1 files changed, 12 insertions, 21 deletions
diff --git a/test/gui/shared/steps/steps.py b/test/gui/shared/steps/steps.py
index 3c00ef760..5f107227b 100644
--- a/test/gui/shared/steps/steps.py
+++ b/test/gui/shared/steps/steps.py
@@ -97,7 +97,16 @@ def startClient(context):
snooze(1)
-def setUpClient(context, username, password, pollingInterval):
+def getPollingInterval():
+ pollingInterval = '''[ownCloud]
+ remotePollInterval={pollingInterval}
+ '''
+ args = {'pollingInterval': 5000}
+ pollingInterval = pollingInterval.format(**args)
+ return pollingInterval
+
+
+def setUpClient(context, username, password):
userSetting = '''
[Accounts]
0/Folders/1/ignoreHiddenFiles=true
@@ -116,7 +125,7 @@ def setUpClient(context, username, password, pollingInterval):
version=2
'''
userFirstName = username.split()
- userSetting = userSetting + pollingInterval
+ userSetting = userSetting + getPollingInterval()
args = {
'displayUserName': username,
'davUserName': userFirstName[0].lower(),
@@ -139,27 +148,9 @@ def setUpClient(context, username, password, pollingInterval):
pass
-def getPasswordForUser(userId):
- if userId in defaultUsers.keys():
- return defaultUsers[userId]['password']
-
-
-@Given(
- 'user "|any|" has set up a client with default settings and polling interval "|any|"'
-)
-def step(context, username, interval):
- pollingInterval = '''[ownCloud]
- remotePollInterval={pollingInterval}
- '''
- args = {'pollingInterval': interval}
- pollingInterval = pollingInterval.format(**args)
- password = getPasswordForUser(username)
- setUpClient(context, username, password, pollingInterval)
-
-
@Given('user "|any|" has set up a client with default settings and password "|any|"')
def step(context, username, password):
- setUpClient(context, username, password, '')
+ setUpClient(context, username, password)
@Given('the user has started the client')