Skip to content

Commit

Permalink
tests: fix manage account locators
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan authored and TheOneRing committed Aug 30, 2024
1 parent f884419 commit 9db27d2
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions test/gui/shared/scripts/pageObjects/AccountSetting.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class AccountSetting:
MANAGE_ACCOUNT_BUTTON = {
"container": names.settings_stack_QStackedWidget,
"name": "accountToolButton",
"name": "manageAccountButton",
"type": "QToolButton",
"visible": 1,
}
Expand All @@ -24,7 +24,7 @@ class AccountSetting:
}
ACCOUNT_CONNECTION_LABEL = {
"container": names.settings_stack_QStackedWidget,
"name": "connectLabel",
"name": "connectionStatusLabel",
"type": "QLabel",
"visible": 1,
}
Expand Down Expand Up @@ -81,17 +81,11 @@ def isConnecting():

@staticmethod
def isUserSignedOut(displayname, server):
signedout_text = 'Signed out from <a href="{server}">{server}</a>.'.format(
server=server
)
return signedout_text == AccountSetting.getAccountConnectionLabel()
return 'Signed out' in AccountSetting.getAccountConnectionLabel()

@staticmethod
def isUserSignedIn(displayname, server):
signedin_text = 'Connected to <a href="{server}">{server}</a>.'.format(
server=server
)
return signedin_text == AccountSetting.getAccountConnectionLabel()
return 'Connected' in AccountSetting.getAccountConnectionLabel()

@staticmethod
def waitUntilConnectionIsConfigured(timeout=5000):
Expand Down

0 comments on commit 9db27d2

Please sign in to comment.