Static helper for RHDH catalog entity lookups via the REST API.
import { CatalogApiHelper } from "@red-hat-developer-hub/e2e-test-utils/helpers";static async entityExists(
baseUrl: string,
token: string,
kind: string,
name: string,
namespace?: string,
): Promise<boolean>Returns true if the entity exists. Returns false on HTTP 404. Rethrows other HTTP errors.
static async getEntity(
baseUrl: string,
token: string,
kind: string,
name: string,
namespace?: string,
): Promise<unknown>Fetches GET /api/catalog/entities/by-name/{kind}/{namespace}/{name}.
static async getEntityDescription(
baseUrl: string,
token: string,
kind: string,
name: string,
namespace?: string,
): Promise<string | undefined>Returns metadata.description from the entity JSON.
static async getGroupEntity(
baseUrl: string,
token: string,
groupName: string,
): Promise<unknown>static async getGroupMembers(
baseUrl: string,
token: string,
groupName: string,
): Promise<string[]>static async dispose(): Promise<void>Disposes the internal Playwright APIRequestContext.
- CatalogApiHelper Guide — usage guide and polling patterns