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-05-26 14:33:21 +0300
committerGitHub <noreply@github.com>2021-05-26 14:33:21 +0300
commiteac5bcbd306d09995f6b9fe4956c38d2142ad2d2 (patch)
tree3f519d0ca20c805f211c49cfd9276ee9b28c3728 /test/gui
parent808284d75bb23a85de3c8068051995dbbf8e18d2 (diff)
[tests-only] refactor steps with password in them (#8656)
Diffstat (limited to 'test/gui')
-rw-r--r--test/gui/shared/scripts/helpers/SetupClientHelper.py4
-rw-r--r--test/gui/shared/steps/steps.py18
-rw-r--r--test/gui/tst_addAccount/test.feature2
-rw-r--r--test/gui/tst_sharing/test.feature38
-rw-r--r--test/gui/tst_syncing/test.feature6
5 files changed, 40 insertions, 28 deletions
diff --git a/test/gui/shared/scripts/helpers/SetupClientHelper.py b/test/gui/shared/scripts/helpers/SetupClientHelper.py
index 5a572716f..61639bba8 100644
--- a/test/gui/shared/scripts/helpers/SetupClientHelper.py
+++ b/test/gui/shared/scripts/helpers/SetupClientHelper.py
@@ -55,7 +55,7 @@ def getPollingInterval():
return pollingInterval
-def setUpClient(context, username, confFilePath):
+def setUpClient(context, username, displayName, confFilePath):
userSetting = '''
[Accounts]
0/Folders/1/ignoreHiddenFiles=true
@@ -76,7 +76,7 @@ def setUpClient(context, username, confFilePath):
userFirstName = username.split()
userSetting = userSetting + getPollingInterval()
args = {
- 'displayUserName': username,
+ 'displayUserName': displayName,
'davUserName': userFirstName[0].lower(),
'displayUserFirstName': userFirstName[0],
'client_sync_path': context.userData['clientSyncPath'],
diff --git a/test/gui/shared/steps/steps.py b/test/gui/shared/steps/steps.py
index 63a1ca41e..471d9349c 100644
--- a/test/gui/shared/steps/steps.py
+++ b/test/gui/shared/steps/steps.py
@@ -87,9 +87,21 @@ def step(context, displayname, host):
)
-@Given('user "|any|" has set up a client with default settings and password "|any|"')
-def step(context, username, password):
- setUpClient(context, username, confFilePath)
+def getDisplayname(username):
+ if username in defaultUsers.keys():
+ return defaultUsers[username]['displayname']
+
+
+def getPasswordForUser(username):
+ if username in defaultUsers.keys():
+ return defaultUsers[username]['password']
+
+
+@Given('user "|any|" has set up a client with default settings')
+def step(context, username):
+ password = getPasswordForUser(username)
+ displayName = getDisplayname(username)
+ setUpClient(context, username, displayName, confFilePath)
enterUserPassword = EnterPassword()
enterUserPassword.enterPassword(password)
diff --git a/test/gui/tst_addAccount/test.feature b/test/gui/tst_addAccount/test.feature
index f0d1d2568..09e7c25bf 100644
--- a/test/gui/tst_addAccount/test.feature
+++ b/test/gui/tst_addAccount/test.feature
@@ -20,7 +20,7 @@ Feature: adding accounts
Scenario: Adding multiple accounts
Given user "Brian" has been created on the server with default attributes and without skeleton files
- And user "Alice Hansen" has set up a client with default settings and password "1234"
+ And user "Alice" has set up a client with default settings
When the user adds an account with
| server | %local_server% |
| user | Brian |
diff --git a/test/gui/tst_sharing/test.feature b/test/gui/tst_sharing/test.feature
index c0b62be12..fe8d85eaa 100644
--- a/test/gui/tst_sharing/test.feature
+++ b/test/gui/tst_sharing/test.feature
@@ -5,20 +5,20 @@ Feature: Sharing
So that those users can access the files and folders
- Background:
+ Background:
Given user "Alice" has been created on the server with default attributes and without skeleton files
Scenario: simple sharing
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 set up a client with default settings and password "1234"
+ And user "Alice" has set up a client with default settings
When the user adds "Brian Murphy" as collaborator of resource "%client_sync_path%/textfile0.txt" with permissions "edit,share" using the client-UI
Then user "Brian Murphy" should be listed in the collaborators list for file "%client_sync_path%/textfile0.txt" with permissions "edit,share" on the client-UI
@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 on the server file with content "ownCloud test text file 0" to "/textfile0.txt"
- And user "Alice" has set up a client with default settings and password "1234"
+ And user "Alice" has set up a client with default settings
When the user opens the public links dialog of "%client_sync_path%/textfile0.txt" using the client-UI
And the user toggles the password protection using the client-UI
And the user toggles the password protection using the client-UI
@@ -34,7 +34,7 @@ Feature: Sharing
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 "Brian" has set up a client with default settings and password "AaBb2Cc3Dd4"
+ 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 user "Brian" opens the sharing dialog of "%client_sync_path%/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
@@ -42,14 +42,14 @@ Feature: Sharing
Scenario: simple sharing of a file by public link without password
Given user "Alice" has uploaded on the server file with content "ownCloud test text file 0" to "/textfile0.txt"
- And user "Alice" has set up a client with default settings and password "1234"
+ And user "Alice" has set up a client with default settings
When the user creates a new public link for file "%client_sync_path%/textfile0.txt" without password using the client-UI
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" without password from the last created public link by "Alice" on the server
Scenario: simple sharing of a file by public link with password
- Given user "Alice" has set up a client with default settings and password "1234"
+ Given user "Alice" has set up a client with default settings
And user "Alice" has uploaded on the server file with content "ownCloud test text file 0" to "/textfile0.txt"
When the user creates a new public link for file "%client_sync_path%/textfile0.txt" with password "pass123" using the client-UI
Then as user "Alice" the file "textfile0.txt" should have a public link on the server
@@ -58,7 +58,7 @@ Feature: Sharing
Scenario: user changes the expiration date of an already existing public link using webUI
Given user "Alice" has uploaded on the server file with content "ownCloud test text file 0" to "/textfile0.txt"
- And user "Alice" has set up a client with default settings and password "1234"
+ And user "Alice" has set up a client with default settings
And user "Alice" has created a public link on the server with following settings
| path | textfile0.txt |
| name | Public link |
@@ -70,30 +70,30 @@ Feature: Sharing
| expireDate | 2038-07-21 |
- Scenario: simple sharing of a folder by public link without password
+ Scenario: simple sharing of a folder by public link without password
Given user "Alice" has created on the server folder "simple-folder"
- And user "Alice" has set up a client with default settings and password "1234"
+ And user "Alice" has set up a client with default settings
When the user creates a new public link with permissions "Download / View" for folder "%client_sync_path%/simple-folder" without password using the client-UI
Then as user "Alice" the folder "simple-folder" should have a public link on the server
And the public should be able to download the folder "lorem.txt" without password from the last created public link by "Alice" on the server
- Scenario: simple sharing of a folder by public link with password
+ Scenario: simple sharing of a folder by public link with password
Given user "Alice" has created on the server folder "simple-folder"
- And user "Alice" has set up a client with default settings and password "1234"
+ And user "Alice" has set up a client with default settings
When the user creates a new public link with permissions "Download / View" for folder "%client_sync_path%/simple-folder" with password "pass123" using the client-UI
Then as user "Alice" the folder "simple-folder" should have a public link on the server
And the public should be able to download the folder "lorem.txt" with password "pass123" from the last created public link by "Alice" on the server
- Scenario: user changes the expiration date of an already existing public link for folder using client-UI
+ Scenario: user changes the expiration date of an already existing public link for folder using client-UI
Given user "Alice" has created on the server folder "simple-folder"
- And user "Alice" has set up a client with default settings and password "1234"
+ And user "Alice" has set up a client with default settings
And user "Alice" has created a public link on the server with following settings
- | path | simple-folder |
- | name | Public link |
- | expireDate | 2031-10-14 |
- | permissions|read, update, create, delete|
+ | path | simple-folder |
+ | name | Public link |
+ | expireDate | 2031-10-14 |
+ | permissions | read, update, create, delete |
When the user opens the public links dialog of "%client_sync_path%/simple-folder" using the client-UI
And the user edits the public link named "Public link" of file "simple-folder" changing following
| expireDate | 2038-07-21 |
@@ -103,7 +103,7 @@ Feature: Sharing
Scenario Outline: simple sharing of folder by public link with different roles
Given user "Alice" has created on the server folder "simple-folder"
- And user "Alice" has set up a client with default settings and password "1234"
+ And user "Alice" has set up a client with default settings
When the user creates a new public link for folder "%client_sync_path%/simple-folder" using the client-UI with these details:
| role | <role> |
Then user "Alice" on the server should have a share with these details:
@@ -123,7 +123,7 @@ Feature: Sharing
Scenario: sharing by public link with "Uploader" role
Given user "Alice" has created on the server folder "simple-folder"
And user "Alice" on the server has created file "simple-folder/lorem.txt"
- And user "Alice" has set up a client with default settings and password "1234"
+ And user "Alice" has set up a client with default settings
When the user creates a new public link for folder "%client_sync_path%/simple-folder" with "Contributor" using the client-UI
Then user "Alice" on the server should have a share with these details:
| field | value |
diff --git a/test/gui/tst_syncing/test.feature b/test/gui/tst_syncing/test.feature
index 200446bae..b5740c367 100644
--- a/test/gui/tst_syncing/test.feature
+++ b/test/gui/tst_syncing/test.feature
@@ -8,7 +8,7 @@ Feature: Syncing files
Given user "Alice" has been created on the server with default attributes and without skeleton files
Scenario: Syncing a file to the server
- Given user "Alice" has set up a client with default settings and password "1234"
+ Given user "Alice" has set up a client with default settings
When the user creates a file "lorem-for-upload.txt" with the following content on the file system
"""
test content
@@ -17,7 +17,7 @@ Feature: Syncing files
Then as "Alice" the file "lorem-for-upload.txt" on the server should have the content "test content"
Scenario: Syncing a file from the server
- Given user "Alice" has set up a client with default settings and password "1234"
+ Given user "Alice" has set up a client with default settings
And user "Alice" has uploaded file on the server with content "test content" to "uploaded-lorem.txt"
When the user waits for file "uploaded-lorem.txt" to be synced
Then the file "uploaded-lorem.txt" should exist on the file system with the following content
@@ -27,7 +27,7 @@ Feature: Syncing files
Scenario: Syncing a file from the server and creating a conflict
Given user "Alice" has uploaded file on the server with content "server content" to "/conflict.txt"
- And user "Alice" has set up a client with default settings and password "1234"
+ And user "Alice" has set up a client with default settings
And the user has waited for file "conflict.txt" to be synced
And the user has paused the file sync
And the user has changed the content of local file "conflict.txt" to: