Skip to content

chore(e2e): remove keycloak catalog plugin tests#4359

Open
gashcrumb wants to merge 1 commit intoredhat-developer:mainfrom
gashcrumb:RHIDP-11367
Open

chore(e2e): remove keycloak catalog plugin tests#4359
gashcrumb wants to merge 1 commit intoredhat-developer:mainfrom
gashcrumb:RHIDP-11367

Conversation

@gashcrumb
Copy link
Member

Description

This change removes the e2e tests for the keycloak catalog provider plugin, and related code that is only used by this test.

Assisted-By: Cursor Desktop

Which issue(s) does this PR fix

Part of RHIDP-11367 and related to this PR

PR acceptance criteria

Please make sure that the following steps are complete:

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

This change removes the e2e tests for the keycloak catalog provider
plugin, and related code that is only used by this test.

Assisted-By: Cursor Desktop
@rhdh-qodo-merge
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

RHIDP-11367 - Partially compliant

Compliant requirements:

  • (none evidenced in this PR diff)

Non-compliant requirements:

  • Create workspace structure at workspaces/keycloak/e2e-tests/, including copying standard config files, and updating package.json / playwright.config.ts names.
  • Create RHDH configuration under tests/config/ (dynamic-plugins.yaml and rhdh-secrets.yaml) based on RHDH core references.
  • Migrate the Keycloak catalog users E2E test into tests/specs/catalog-users.spec.ts.
  • Verify that all 2 test cases pass.

Requires further human verification:

  • (none)
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🔒 No security concerns identified
⚡ Recommended focus areas for review

Breaking Change

CatalogUsersPO now only exposes visitBaseURL and no longer provides locators/actions (e.g., list of users, email link, group link, visit user page). Validate no other remaining tests/utilities import and rely on the removed methods, otherwise the E2E suite may fail at compile/runtime.

import { Page } from "@playwright/test";

export class CatalogUsersPO {
  static BASE_URL = "/catalog?filters%5Bkind%5D=user&filters%5Buser";

  static async visitBaseURL(page: Page) {
    await page.goto(this.BASE_URL);
  }
Dependency Impact

node-fetch was removed; confirm no remaining E2E utilities rely on v2 node-fetch imports/types (directly or transitively) and that the intended runtime fetch implementation is consistent (Node built-in fetch vs isomorphic-fetch).

"dependencies": {
  "@azure/arm-network": "34.2.0",
  "@azure/identity": "4.13.0",
  "@keycloak/keycloak-admin-client": "25.0.6",
  "@kubernetes/client-node": "0.22.3",
  "@microsoft/microsoft-graph-client": "3.0.7",
  "isomorphic-fetch": "3.0.0",
  "js-yaml": "4.1.1",
  "octokit": "4.1.4",
  "pg": "8.18.0",
  "prettier-plugin-sh": "0.18.0",
  "uuid": "11.1.0",
📄 References
  1. redhat-developer/rhdh/e2e-tests/playwright/e2e/plugins/orchestrator/orchestrator-rbac.spec.ts [12-1553]
  2. redhat-developer/rhdh/e2e-tests/playwright/e2e/plugins/rbac/rbac.spec.ts [22-965]
  3. redhat-developer/rhdh/e2e-tests/playwright/e2e/plugins/topology/topology-rbac.spec.ts [1-84]
  4. redhat-developer/rhdh/e2e-tests/playwright/e2e/auth-providers/oidc.spec.ts [21-536]

@rhdh-qodo-merge
Copy link

PR Type

Enhancement


Description

  • Remove Keycloak catalog plugin e2e tests and related test utilities

  • Delete Keycloak authentication and user management test code

  • Remove unused page object methods for user catalog interactions

  • Remove node-fetch dependency from package.json


File Walkthrough

Relevant files
Tests
catalog-users.spec.ts
Delete Keycloak catalog plugin e2e test suite                       

e2e-tests/playwright/e2e/plugins/keycloak/catalog-users.spec.ts

  • Deleted entire test file containing Keycloak plugin e2e tests
  • Removed test suite for user synchronization between Keycloak and
    Backstage
  • Removed test suite for Keycloak metrics validation with failure
    counters
  • Removed helper function fetchMetrics for metrics endpoint retrieval
+0/-142 
catalog-users-obj.ts
Remove unused catalog users page object methods                   

e2e-tests/playwright/support/page-objects/catalog/catalog-users-obj.ts

  • Removed getListOfUsers method that retrieved user links from catalog
    table
  • Removed getEmailLink method for email link locator
  • Removed visitUserPage method for navigating to user detail pages
  • Removed getGroupLink method for group link locator
  • Kept only BASE_URL constant and visitBaseURL method
+1/-31   
group.ts
Delete Keycloak Group interface file                                         

e2e-tests/playwright/utils/keycloak/group.ts

  • Deleted entire file containing Group interface definition
  • Removed interface with id, name, and path properties
+0/-7     
keycloak.ts
Delete Keycloak utility class and methods                               

e2e-tests/playwright/utils/keycloak/keycloak.ts

  • Deleted entire Keycloak utility class file
  • Removed authentication token retrieval functionality
  • Removed user and group fetching methods from Keycloak admin API
  • Removed user details verification logic for test assertions
+0/-117 
user.ts
Delete Keycloak User interface file                                           

e2e-tests/playwright/utils/keycloak/user.ts

  • Deleted entire file containing User interface definition
  • Removed interface with id, username, firstName, lastName, and email
    properties
+0/-9     
Dependencies
package.json
Remove node-fetch dependency                                                         

e2e-tests/package.json

  • Removed node-fetch dependency version 2.7.0 from dependencies section
+0/-1     

@rhdh-qodo-merge
Copy link

PR Code Suggestions ✨

No code suggestions found for the PR.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 4, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Image was built and published successfully. It is available at:

@github-actions
Copy link
Contributor

This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 21 days.

@github-actions github-actions bot added the Stale label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant