diff --git a/test/gui/shared/scripts/helpers/SpaceHelper.py b/test/gui/shared/scripts/helpers/SpaceHelper.py index e8e56b1c1f2..4026c423821 100644 --- a/test/gui/shared/scripts/helpers/SpaceHelper.py +++ b/test/gui/shared/scripts/helpers/SpaceHelper.py @@ -27,7 +27,7 @@ def get_share_endpint(): def create_space(space_name): - body = json.dumps({"Name": space_name}) + body = json.dumps({"name": space_name}) response = request.post(get_space_endpint(), body) if response.status_code != 201: raise Exception( diff --git a/test/gui/shared/scripts/pageObjects/EnterPassword.py b/test/gui/shared/scripts/pageObjects/EnterPassword.py index 01752cd3704..33bdec07895 100644 --- a/test/gui/shared/scripts/pageObjects/EnterPassword.py +++ b/test/gui/shared/scripts/pageObjects/EnterPassword.py @@ -1,3 +1,4 @@ +import names import squish from helpers.WebUIHelper import authorize_via_webui from helpers.ConfigHelper import get_config @@ -5,7 +6,7 @@ class EnterPassword: - LOGIN_DIALOG = { + LOGIN_CONTAINER = { "name": "LoginRequiredDialog", "type": "OCC::LoginRequiredDialog", "visible": 1, @@ -14,37 +15,37 @@ class EnterPassword: "name": "topLabel", "type": "QLabel", "visible": 1, - "window": LOGIN_DIALOG, + "window": LOGIN_CONTAINER, } USERNAME_BOX = { "name": "usernameLineEdit", "type": "QLineEdit", "visible": 1, - "window": LOGIN_DIALOG, + "window": LOGIN_CONTAINER, } PASSWORD_BOX = { "name": "passwordLineEdit", "type": "QLineEdit", "visible": 1, - "window": LOGIN_DIALOG, + "window": LOGIN_CONTAINER, } LOGIN_BUTTON = { "text": "Log in", "type": "QPushButton", "visible": 1, - "window": LOGIN_DIALOG, + "window": names.stack_stackedWidget_QStackedWidget, } LOGOUT_BUTTON = { "text": "Log out", "type": "QPushButton", "visible": 1, - "window": LOGIN_DIALOG, + "window": names.stack_stackedWidget_QStackedWidget, } COPY_URL_TO_CLIPBOARD_BUTTON = { "name": "copyUrlToClipboardButton", "type": "QPushButton", "visible": 1, - "window": LOGIN_DIALOG, + "window": LOGIN_CONTAINER, } TLS_CERT_WINDOW = { "name": "OCC__TlsErrorDialog", @@ -59,9 +60,7 @@ class EnterPassword: } def __init__(self, occurrence=1): - if occurrence > 1 and not get_config('ocis'): - self.LOGIN_DIALOG.update({"occurrence": occurrence}) - elif occurrence > 1 and get_config('ocis'): + if occurrence > 1 and get_config('ocis'): self.TLS_CERT_WINDOW.update({"occurrence": occurrence}) def get_username(self): diff --git a/test/gui/shared/steps/spaces_context.py b/test/gui/shared/steps/spaces_context.py index 5dd20c36bc2..096e593a400 100644 --- a/test/gui/shared/steps/spaces_context.py +++ b/test/gui/shared/steps/spaces_context.py @@ -40,6 +40,8 @@ def step(context, user, space_name): password = getPasswordForUser(user) setUpClient(user, space_name) enter_password = EnterPassword() + if get_config('ocis'): + enter_password.accept_certificate() enter_password.loginAfterSetup(user, password) # wait for files to sync waitForInitialSyncToComplete(getResourcePath('/', user, space_name))