test: create automated tests for ldap login

Merged
JE
1mo ago
+284-51

Proposed changes

Adds end-to-end coverage for LDAP authentication using the existing OpenLDAP CI service.

  • Configures the LDAP settings required by the test while preserving and restoring their original values.
  • Verifies LDAP connectivity and user search through /ldap.testConnection and /ldap.testSearch.
  • Verifies login and LDAP field mapping for username, name, and email.
  • Adds a dedicated ldap.e2e identity under ou=others so the test does not overlap with ABAC synchronization.
  • Verifies jpegPhoto avatar synchronization by comparing the served avatar with a Playwright image snapshot.
  • Removes the test user through /users.delete before and after the suite to keep runs isolated.

Issue(s)

QA-95

Test coverage

  • LDAP connection
  • LDAP user search
  • LDAP login
  • Username, name, and email mapping
  • LDAP avatar synchronization
  • Settings restoration and test-user cleanup
  • Enterprise CI execution

Further comments

The avatar baseline is intentionally committed because Playwright uses it for pixel comparison. The Linux suffix is generated automatically by Playwright and matches the CI platform.

Summary by CodeRabbit

  • Tests
    • Added end-to-end coverage for LDAP connection testing, user search, credential-based login, field mapping, and avatar synchronization.
    • Added test data for an LDAP user with profile details, email, password, and photo.
    • LDAP tests run only in Enterprise Edition environments and clean up test data afterward.