diff options
author | amrita <anukanxi05@gmail.com> | 2022-07-01 10:06:08 +0300 |
---|---|---|
committer | amrita <anukanxi05@gmail.com> | 2022-07-04 06:55:01 +0300 |
commit | cebd8630b9a0eaf125c995256c2b528855391214 (patch) | |
tree | 724f3d238218ebc0020441fbb68caf03a5760433 | |
parent | 1b93ded4b3528f4d6a255ea43193f6498c13a8c4 (diff) |
Refactor suggested changesvirtual-file-tests
-rw-r--r-- | test/gui/shared/scripts/names.py | 1 | ||||
-rw-r--r-- | test/gui/shared/scripts/pageObjects/AccountConnectionWizard.py | 12 | ||||
-rw-r--r-- | test/gui/shared/steps/steps.py | 25 | ||||
-rw-r--r-- | test/gui/tst_addAccount/test.feature | 5 |
4 files changed, 23 insertions, 20 deletions
diff --git a/test/gui/shared/scripts/names.py b/test/gui/shared/scripts/names.py index 9171dae00..58afa0fbe 100644 --- a/test/gui/shared/scripts/names.py +++ b/test/gui/shared/scripts/names.py @@ -136,5 +136,4 @@ add_Folder_Sync_Connection_Deselect_remote_folders_you_do_not_wish_to_synchroniz deselect_remote_folders_you_do_not_wish_to_synchronize_ownCloud_QModelIndex = {"column": 0, "container": add_Folder_Sync_Connection_Deselect_remote_folders_you_do_not_wish_to_synchronize_QTreeWidget, "text": "ownCloud", "type": "QModelIndex"} syncModeGroupBox_useVfsRadioButton_QRadioButton = {"container": advancedConfigGroupBox_syncModeGroupBox_QGroupBox, "name": "useVfsRadioButton", "type": "QRadioButton", "visible": 1} contentWidget_Enable_experimental_placeholder_mode_QPushButton = {"container": setupWizardWindow_contentWidget_QStackedWidget, "text": "Enable experimental placeholder mode", "type": "QPushButton", "unnamed": 1, "visible": 1} -enable_experimental_feature_QMessageBox = {"type": "QMessageBox", "unnamed": 1, "visible": 1, "windowTitle": "Enable experimental feature?"} contentWidget_Stay_safe_QPushButton = {"container": setupWizardWindow_contentWidget_QStackedWidget, "text": "Stay safe", "type": "QPushButton", "unnamed": 1, "visible": 1} diff --git a/test/gui/shared/scripts/pageObjects/AccountConnectionWizard.py b/test/gui/shared/scripts/pageObjects/AccountConnectionWizard.py index 9517a8a7f..611d6fcb8 100644 --- a/test/gui/shared/scripts/pageObjects/AccountConnectionWizard.py +++ b/test/gui/shared/scripts/pageObjects/AccountConnectionWizard.py @@ -98,7 +98,9 @@ class AccountConnectionWizard: "visible": 1, } VIRTUAL_File_RADIO_BUTTON = names.syncModeGroupBox_useVfsRadioButton_QRadioButton - ENABLE_EXPERIMENTAL_FEATURE_BUTTON = names.contentWidget_Enable_experimental_placeholder_mode_QPushButton + ENABLE_EXPERIMENTAL_FEATURE_BUTTON = ( + names.contentWidget_Enable_experimental_placeholder_mode_QPushButton + ) STAY_SAFE_BUTTON = names.contentWidget_Stay_safe_QPushButton def __init__(self): @@ -161,11 +163,11 @@ class AccountConnectionWizard: ) def addAccount(self, context): - self.addAccountCerediental(context) + self.addAccountCredential(context) self.finishSetup() - - def addAccountCerediental(self, context): - self.addServer(context) + + def addAccountCredential(self, context): + self.addServer(context) self.addUserCreds(context) self.selectSyncFolder(context) diff --git a/test/gui/shared/steps/steps.py b/test/gui/shared/steps/steps.py index 60cee70f5..39622638f 100644 --- a/test/gui/shared/steps/steps.py +++ b/test/gui/shared/steps/steps.py @@ -139,7 +139,7 @@ def step(context, accountType): @Given('the user has added the following account information:') def step(context): newAccount = AccountConnectionWizard() - newAccount.addAccountCerediental(context) + newAccount.addAccountCredential(context) # Using socket API to check file sync status @@ -1463,13 +1463,6 @@ def step(context): waitForObject(AccountConnectionWizard.CREDENTIAL_PAGE) -@When("the user selects configure_synchronization_manually option in advanced section") -def step(context): - newAccount = AccountConnectionWizard() - clickButton(waitForObject(newAccount.CONF_SYNC_MANUALLY_RADIO_BUTTON)) - clickButton(waitForObject(newAccount.NEXT_BUTTON)) - - @When('the user "|any|" clicks on the next button in sync connection wizard') def step(context, userName): newAccount = AccountConnectionWizard() @@ -1487,17 +1480,23 @@ def step(context, folderName): clickButton(waitForObject(newAccount.ADD_FOLDER_SYNC_CONNECTION_NEXT_BUTTON)) -@When(r'^the user adds (the first|another) account with advanced configuration$', regexp=True) +@When( + r'^the user adds (the first|another) account with advanced configuration$', + regexp=True, +) def step(context, accountType): newAccount = AccountConnectionWizard() if accountType == 'another': toolbar = Toolbar() toolbar.clickAddAccount() - newAccount.addAccountCerediental(context) + newAccount.addAccountCredential(context) -@When(r'^the user selects (virtual_files|configure_synchronization_manually) option in advanced section$', regexp= True) +@When( + r'^the user selects (virtual_files|configure_synchronization_manually) option in advanced section$', + regexp=True, +) def step(context, advancedConfigOption): newAccount = AccountConnectionWizard() if advancedConfigOption == 'configure_synchronization_manually': @@ -1507,7 +1506,9 @@ def step(context, advancedConfigOption): clickButton(waitForObject(newAccount.VIRTUAL_File_RADIO_BUTTON)) -@When("the user enables experimental feature") +@When( + "the user selects enable_experimental_placeholder_mode option in enable experimental feature dialogue box" +) def step(context): newAccount = AccountConnectionWizard() clickButton(waitForObject(newAccount.ENABLE_EXPERIMENTAL_FEATURE_BUTTON)) diff --git a/test/gui/tst_addAccount/test.feature b/test/gui/tst_addAccount/test.feature index 56570dfd8..eaa9aa48d 100644 --- a/test/gui/tst_addAccount/test.feature +++ b/test/gui/tst_addAccount/test.feature @@ -46,14 +46,14 @@ Feature: adding accounts Then credentials wizard should be visible - Scenario: Adding account with virtual files advance configuration + Scenario: Adding account with virtual files enabled through advance configuration Given the user has started the client When the user adds the first account with advanced configuration | server | %local_server% | | user | Alice | | password | 1234 | And the user selects virtual_files option in advanced section - And the user enables experimental feature + And the user selects enable_experimental_placeholder_mode option in enable experimental feature dialogue box Then VFS enabled baseline image should match the default screenshot @@ -66,3 +66,4 @@ Feature: adding accounts And the user selects virtual_files option in advanced section And the user selects stay_safe option in enable experimental feature dialogue box Then an account should be displayed with the displayname Alice Hansen and host %local_server_hostname% + And VFS enabled baseline image should not match the default screenshot |