diff --git a/test/gui/features/add-account/account.feature b/test/gui/features/add-account/account.feature index 7e7fe263e..5294cfab5 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 - @skip + 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..f4fb1e564 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) + LOGIN_DIALOG = SimpleNamespace(by=By.NAME, selector="Log in with your web browser") COPY_URL_TO_CLIPBOARD_BUTTON = SimpleNamespace( by=By.NAME, selector="Copy URL", @@ -192,12 +192,10 @@ def is_new_connection_window_visible(): @staticmethod def is_credential_window_visible(): - visible = False - try: - squish.waitForObject(AccountConnectionWizard.OAUTH_CREDENTIAL_PAGE) - visible = True - except: - pass + visible = app().find_element( + AccountConnectionWizard.LOGIN_DIALOG.by, + AccountConnectionWizard.LOGIN_DIALOG.selector + ).is_displayed() return visible @staticmethod diff --git a/test/gui/steps/account_context.py b/test/gui/steps/account_context.py index 80b4155be..18ebb662e 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,10 @@ def step(context): @Then('credentials wizard should be visible') def step(context): - test.compare( - AccountConnectionWizard.is_credential_window_visible(), - True, - 'Credentials wizard is visible', - ) - + with ensure( + 'Credentials wizard is not be visible' + ): + AccountConnectionWizard.is_credential_window_visible().should.be.true @When('the user selects download everything option in advanced section') def step(context):