From dcd06adb8b26352529c4bbc591f899b66bbe198e Mon Sep 17 00:00:00 2001 From: Salipa-Gurung Date: Mon, 18 Sep 2023 12:58:04 +0545 Subject: [PATCH] add step implementation for oauth2 login --- test/gui/shared/scripts/pageObjects/EnterPassword.py | 2 +- test/gui/shared/steps/account_context.py | 5 +++++ test/gui/tst_loginLogout/test.feature | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/gui/shared/scripts/pageObjects/EnterPassword.py b/test/gui/shared/scripts/pageObjects/EnterPassword.py index 8b33b01b824..1fea7d7a8f7 100644 --- a/test/gui/shared/scripts/pageObjects/EnterPassword.py +++ b/test/gui/shared/scripts/pageObjects/EnterPassword.py @@ -35,7 +35,7 @@ def enterPassword(password): squish.clickButton(squish.waitForObject(EnterPassword.LOGIN_BUTTON)) @staticmethod - def oidcReLogin(username, password, login_type=None): + def oidcReLogin(username, password, login_type='oidc'): # wait 500ms for copy button to fully load squish.snooze(1 / 2) squish.clickButton( diff --git a/test/gui/shared/steps/account_context.py b/test/gui/shared/steps/account_context.py index fdcbc3f35b4..aa376adc208 100644 --- a/test/gui/shared/steps/account_context.py +++ b/test/gui/shared/steps/account_context.py @@ -271,3 +271,8 @@ def step(context, username): EnterPassword.oidcReLogin( username, getPasswordForUser(username), login_type='oauth' ) + + +@When('the user starts the client') +def step(context): + startClient() diff --git a/test/gui/tst_loginLogout/test.feature b/test/gui/tst_loginLogout/test.feature index 25b93925166..b98f5b104fe 100644 --- a/test/gui/tst_loginLogout/test.feature +++ b/test/gui/tst_loginLogout/test.feature @@ -49,6 +49,6 @@ Feature: Logout users | server | %local_server% | | user | Alice | | password | 1234 | - When user quits the client - And user starts the client + And the user quits the client + When the user starts the client Then user "Alice" should be connect to the client-UI