Skip to content

Commit

Permalink
[Tests Only] add test for vfs
Browse files Browse the repository at this point in the history
  • Loading branch information
swoichha committed Jul 21, 2021
1 parent eff4584 commit e81c225
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/gui/shared/scripts/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,5 @@
o_tableView_0_1_QModelIndex = {"column": 1, "container": oCC_IssuesWidget_tableView_QTableView, "row": 0, "type": "QModelIndex"}
settings_settingsdialog_toolbutton_Add_account_QToolButton = {"name": "settingsdialog_toolbutton_Add account", "type": "QToolButton", "visible": 1, "window": settings_OCC_SettingsDialog}
settings_settingsdialog_toolbutton_Activity_QToolButton = {"name": "settingsdialog_toolbutton_Activity", "type": "QToolButton", "visible": 1, "window": settings_OCC_SettingsDialog}
sharingDialog_Close_QPushButton = {"text": "Close", "type": "QPushButton", "unnamed": 1, "visible": 1, "window": sharingDialog_OCC_ShareDialog}
sharingDialog_Close_QPushButton = {"text": "Close", "type": "QPushButton", "unnamed": 1, "visible": 1, "window": sharingDialog_OCC_ShareDialog}
stack_Enable_experimental_placeholder_mode_QPushButton = {"container": settings_stack_QStackedWidget, "text": "Enable experimental placeholder mode", "type": "QPushButton", "unnamed": 1, "visible": 1}
12 changes: 12 additions & 0 deletions test/gui/shared/steps/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,3 +724,15 @@ def step(context, resource, group):

sharingDialog = SharingDialog()
sharingDialog.selectCollaborator(group, True)


@When("the user enables virtual file support")
def step(context):
mouseClick(waitForObjectItem(names.stack_folderList_QTreeView, "_1"), 718, 27, Qt.NoModifier, Qt.LeftButton)
activateItem(waitForObjectItem(names.settings_QMenu, "Enable virtual file support (experimental)..."))
clickButton(waitForObject(names.stack_Enable_experimental_placeholder_mode_QPushButton))


@Then("the virtual file support should be enabled")
def step(context):
pass
2 changes: 1 addition & 1 deletion test/gui/suite.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ HOOK_SUB_PROCESSES=false
IMPLICITAUTSTART=0
LANGUAGE=Python
OBJECTMAPSTYLE=script
TEST_CASES=tst_addAccount tst_sharing tst_syncing tst_loginLogout tst_removeAccountConnection tst_checkAlltabs
TEST_CASES=tst_addAccount tst_sharing tst_syncing tst_loginLogout tst_removeAccountConnection tst_checkAlltabs tst_vfs
VERSION=3
WRAPPERS=Qt
12 changes: 12 additions & 0 deletions test/gui/tst_vfs/test.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Feature: Enable/disable virtual file support

As a user
I want to enable virtual file support
So that I can synchronize virtual files with local folder


Scenario: Enable VFS
Given user "Alice" has been created on the server with default attributes and without skeleton files
And user "Alice" has set up a client with default settings
When the user enables virtual file support
Then the virtual file support should be enabled
8 changes: 8 additions & 0 deletions test/gui/tst_vfs/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source(findFile('scripts', 'python/bdd.py'))

setupHooks('../shared/scripts/bdd_hooks.py')
collectStepDefinitions('./steps', '../shared/steps')

def main():
testSettings.throwOnFailure = True
runFeatureFile('test.feature')

0 comments on commit e81c225

Please sign in to comment.