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-08-09 10:07:48 +0300
committerHannah von Reth <hannah.vonreth@owncloud.com>2021-08-09 13:13:18 +0300
commitc625d2d0af226a23b0398ae63bc7b000492c8102 (patch)
treee8db5a11edac748bb0d62d7b6ace27506245ff5b /test/gui/shared/steps
parenta41bc4ac618374338c050daffd453b44d42dc5f1 (diff)
[Tests Only] add test for enable/disable vfs (#8835)
* [Tests Only] add test for vfs * add test for disabling vfs * vfs object from model * make code DRY * added few comment for coordinates
Diffstat (limited to 'test/gui/shared/steps')
-rw-r--r--test/gui/shared/steps/steps.py62
1 files changed, 62 insertions, 0 deletions
diff --git a/test/gui/shared/steps/steps.py b/test/gui/shared/steps/steps.py
index 56f8aceef..85a99f70f 100644
--- a/test/gui/shared/steps/steps.py
+++ b/test/gui/shared/steps/steps.py
@@ -744,3 +744,65 @@ def step(context, resource, content):
print("file has been overwritten")
waitForFileToBeSynced(context, resource)
+
+
+def enableVFSSupport(vfsBtnText):
+ # The enabling/disabling VFS button do not have it's own object
+ # But it is inside the "stack_folderList_QTreeView" object.
+ # So we are clicking at (718, 27) of "stack_folderList_QTreeView" object to enable/disable VFS
+ mouseClick(
+ waitForObjectItem(names.stack_folderList_QTreeView, "_1"),
+ 718,
+ 27,
+ Qt.NoModifier,
+ Qt.LeftButton,
+ )
+ activateItem(waitForObjectItem(names.settings_QMenu, vfsBtnText))
+ clickButton(
+ waitForObject(names.stack_Enable_experimental_placeholder_mode_QPushButton)
+ )
+
+
+@When("the user enables virtual file support")
+def step(context):
+ enableVFSSupport("Enable virtual file support (experimental)...")
+
+
+@Then('the "|any|" button should be available')
+def step(context, btnText):
+ # The enabling/disabling VFS button do not have it's own object
+ # But it is inside the "stack_folderList_QTreeView" object.
+ # So we are clicking at (718, 27) of "stack_folderList_QTreeView" object to enable/disable VFS
+ mouseClick(
+ waitForObjectItem(names.stack_folderList_QTreeView, "_1"),
+ 718,
+ 27,
+ Qt.NoModifier,
+ Qt.LeftButton,
+ )
+ waitForObjectItem(names.settings_QMenu, btnText)
+
+
+@Given("the user has enabled virtual file support")
+def step(context):
+ enableVFSSupport("Enable virtual file support (experimental)...")
+
+
+@When("the user disables virtual file support")
+def step(context):
+ # The enabling/disabling VFS button do not have it's own object
+ # But it is inside the "stack_folderList_QTreeView" object.
+ # So we are clicking at (718, 27) of "stack_folderList_QTreeView" object to enable/disable VFS
+ mouseClick(
+ waitForObjectItem(names.stack_folderList_QTreeView, "_1"),
+ 733,
+ 27,
+ Qt.NoModifier,
+ Qt.LeftButton,
+ )
+ activateItem(
+ waitForObjectItem(names.settings_QMenu, "Disable virtual file support...")
+ )
+ clickButton(
+ waitForObject(names.disable_virtual_file_support_Disable_support_QPushButton)
+ )