diff --git a/requirements.txt b/requirements.txt index f9501d9a..c94c2ca4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,5 +11,5 @@ kiwitcms-trackers-integration==1.4.0 psycopg-pool==3.3.1 python3-saml==1.16.0 sentry-sdk[django]==2.64.0 -social-auth-app-django==5.9.0 +social-auth-app-django==6.0.0 social-auth-kerberos==0.3.2 diff --git a/tcms_enterprise/templates/registration/custom_login.html b/tcms_enterprise/templates/registration/custom_login.html index 41b7f0fd..3ab70d30 100644 --- a/tcms_enterprise/templates/registration/custom_login.html +++ b/tcms_enterprise/templates/registration/custom_login.html @@ -28,11 +28,15 @@

{% for backend in backends.backends %} - +
+ {% csrf_token %} {% with "images/social_auth/backends/"|add:backend|lower|add:".png" as image_path %} - {{ backend|title }} login + {% endwith %} - +
  {% endfor %} diff --git a/testing/keycloak.robot b/testing/keycloak.robot index 0008f1fa..9ee27995 100644 --- a/testing/keycloak.robot +++ b/testing/keycloak.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Alexander Todorov +# Copyright (c) 2021-2026 Alexander Todorov # # Licensed under GNU Affero General Public License v3 or later (AGPLv3+) # https://www.gnu.org/licenses/agpl-3.0.html @@ -10,7 +10,7 @@ Library SeleniumLibrary ${SERVER} https://testing.example.bg ${BROWSER} Headless Firefox ${DELAY} 0 -${LOGIN_URL} ${SERVER}/login/keycloak +${LOGIN_URL} ${SERVER}/accounts/login/ ${DASHBOARD_URL} ${SERVER}/ @@ -19,6 +19,9 @@ Login via Keycloak Open Browser ${LOGIN_URL} ${BROWSER} Maximize Browser Window Set Selenium Speed ${DELAY} + Title Should Be Kiwi TCMS - Login + + Click Element id:keycloak-login Title Should Be Sign in to kiwi Input Text username kc_atodorov diff --git a/testing/test_docker.sh b/testing/test_docker.sh index f49a140e..87480767 100755 --- a/testing/test_docker.sh +++ b/testing/test_docker.sh @@ -134,24 +134,21 @@ rlJournalStart # template override for social icons rlAssertGrep "Continue with" page.html - # social backends are listed - # for ICON in tcms_enterprise/static/images/social_auth/backends/*.png; do - # BACKEND=`basename $ICON | sed 's/.png//'` # check only the backends enabled in test_settings.py b/c the directory above # contains more images than backends which can be enabled during testing for BACKEND in kerberos keycloak gitlab github github-app fedora; do rlAssertGrep "/login/$BACKEND/" page.html - rlAssertGrep "