Skip to main content

Testing Overview

Orphelix has comprehensive test coverage with 300+ tests across unit and E2E testing:

Unit Tests

214 tests with Vitest
  • Component tests
  • Hook tests
  • Utility function tests

E2E Tests

93 tests with Playwright
  • User flow testing
  • Integration testing
  • Visual regression testing

Running Tests

Unit Tests

E2E Tests

Test Structure

Unit Tests Location

E2E Tests Location

Writing Unit Tests

Component Testing Example

Hook Testing Example

Writing E2E Tests

Page Testing Example

User Flow Testing

Test Coverage

Current coverage (as of latest):

View Coverage Report

Opens an HTML report in your browser showing detailed coverage for each file.

Testing with Real Cluster

Prerequisites

Access to a K8s cluster (Minikube, Kind, or cloud provider)
Configured and authenticated
Read access to resources in target namespace

Setup Test Cluster

Option 1: Minikube

Option 2: Kind

Test Real Mode

1

Start application

2

Click 'DEMO MODE' badge

Switch from demo to real cluster
3

Select kubectl context

Choose your test cluster context
4

Test connection

Click “Test Connection” to verify access
5

Switch mode

Click “Switch to Real Cluster”
6

Verify data

Confirm you see real resources from your cluster

CI/CD Testing

GitHub Actions

Tests run automatically on every push and PR:

Best Practices

Every new component or feature should include tests
Don’t just test happy paths - test errors, loading states, and edge cases
Add data-testid attributes for reliable E2E selectors
Mock API calls, K8s client, and other external dependencies in unit tests
Unit tests should run in milliseconds, E2E tests in seconds

Troubleshooting

Increase timeout in test file:
Make sure dev server is running:
Clear cache and reinstall:

Next Steps

Contributing

Learn how to contribute code

Architecture

Understand the system design