Core Concepts
This section covers the fundamental concepts you need to understand when using rhdh-e2e-test-utils.
Package Architecture
The package is organized into several modules, each with a specific purpose:
rhdh-e2e-test-utils
├── /test → Playwright fixtures
├── /playwright-config → Base Playwright configuration
├── /rhdh → RHDH deployment class
├── /keycloak → Keycloak deployment helper
├── /utils → Utility functions
├── /helpers → UI, Login, API helpers
├── /pages → Page object classes
├── /eslint → ESLint configuration
└── /tsconfig → TypeScript configurationKey Concepts
1. Playwright Fixtures
The package extends Playwright's test framework with custom fixtures:
rhdh- Manages RHDH deployment lifecycleuiHelper- Provides UI interaction methodsloginHelper- Handles authenticationbaseURL- Automatically set to RHDH URL
Learn more about Playwright Fixtures →
2. Deployment Lifecycle
Tests follow a deployment lifecycle:
- Configure - Set deployment options (auth, plugins, configs)
- Deploy - Create namespace, apply configs, install RHDH
- Test - Run Playwright tests
- Cleanup - Delete namespace (in CI)
typescript
test.beforeAll(async ({ rhdh }) => {
await rhdh.configure({ auth: "keycloak" });
await rhdh.deploy();
});3. Configuration Merging
Configurations are merged in layers:
- Common configs - Base configurations included with the package
- Auth configs - Provider-specific configs (guest, keycloak)
- Project configs - Your custom configurations
This allows you to override only what you need while using sensible defaults.
4. Namespace Management
- Namespaces are derived from Playwright project names
- Each worker gets its own namespace
- Automatic cleanup in CI environments
5. Authentication Providers
Two authentication providers are supported:
| Provider | Use Case |
|---|---|
guest | Development and simple testing |
keycloak | OIDC authentication testing |
In This Section
- Package Exports - All available exports
- Playwright Fixtures - Custom fixtures
- Playwright Configuration - Configuration options
- Global Setup - Pre-test setup behavior