From 262ec3f1f88c095bc40fd70b1a4819afa5e765cd Mon Sep 17 00:00:00 2001 From: Asmitapaudel Date: Wed, 27 May 2026 15:48:27 +0545 Subject: [PATCH] enable account test Signed-off-by: Asmitapaudel --- test/gui/features/add-account/account.feature | 2 +- test/gui/pageObjects/AccountConnectionWizard.py | 7 +++++-- test/gui/steps/account_context.py | 13 ++++--------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/test/gui/features/add-account/account.feature b/test/gui/features/add-account/account.feature index 202ed6eee..3af8a48b9 100644 --- a/test/gui/features/add-account/account.feature +++ b/test/gui/features/add-account/account.feature @@ -38,7 +38,7 @@ Feature: adding accounts Then "Brian" account should be opened And "Alice" account should be added - + @smoke Scenario: Adding account with self signed certificate for the first time Given the user has started the client When the user adds the server "%local_server%" diff --git a/test/gui/pageObjects/AccountConnectionWizard.py b/test/gui/pageObjects/AccountConnectionWizard.py index bef9c4e35..9fa6ebf67 100644 --- a/test/gui/pageObjects/AccountConnectionWizard.py +++ b/test/gui/pageObjects/AccountConnectionWizard.py @@ -32,7 +32,7 @@ class AccountConnectionWizard: selector="QApplication.Settings.centralwidget.dialogStack.SetupWizardWidget.contentWidget.AccountConfiguredWizardPage.advancedConfigGroupBox.advancedConfigGroupBoxContentWidget.localDirectoryGroupBox.chooseLocalDirectoryButton", ) CHOOSE_FOLDER_BUTTON = SimpleNamespace(by=By.NAME, selector="Choose") - OAUTH_CREDENTIAL_PAGE = SimpleNamespace(by=None, selector=None) + OAUTH_CREDENTIAL_PAGE = SimpleNamespace(by=By.XPATH, selector="//label[@name='Log in with your web browser']") COPY_URL_TO_CLIPBOARD_BUTTON = SimpleNamespace( by=By.NAME, selector="Copy URL", @@ -194,7 +194,10 @@ def is_new_connection_window_visible(): def is_credential_window_visible(): visible = False try: - squish.waitForObject(AccountConnectionWizard.OAUTH_CREDENTIAL_PAGE) + app().find_element( + AccountConnectionWizard.OAUTH_CREDENTIAL_PAGE.by, + AccountConnectionWizard.OAUTH_CREDENTIAL_PAGE.selector + ) visible = True except: pass diff --git a/test/gui/steps/account_context.py b/test/gui/steps/account_context.py index 80b4155be..582c9800c 100644 --- a/test/gui/steps/account_context.py +++ b/test/gui/steps/account_context.py @@ -179,9 +179,9 @@ def step(context): AccountConnectionWizard.accept_certificate() -@When('the user adds the server "|any|"') -def step(context, server): - server_url = substitute_inline_codes(server) +@When('the user adds the server "{server_url}"') +def step(context, server_url): + server_url = substitute_inline_codes(server_url) AccountConnectionWizard.add_server(server_url) @@ -193,12 +193,7 @@ def step(context): @Then('credentials wizard should be visible') def step(context): - test.compare( - AccountConnectionWizard.is_credential_window_visible(), - True, - 'Credentials wizard is visible', - ) - + AccountConnectionWizard.is_credential_window_visible() @When('the user selects download everything option in advanced section') def step(context):