Skip to content

ci: define basic e2e tests - #86

Open
andyatmiami wants to merge 1 commit into
notebooks-v2from
test/e2e-cypress-tests
Open

ci: define basic e2e tests#86
andyatmiami wants to merge 1 commit into
notebooks-v2from
test/e2e-cypress-tests

Conversation

@andyatmiami

Copy link
Copy Markdown
Owner

No description provided.

@andyatmiami
andyatmiami force-pushed the test/e2e-cypress-tests branch 2 times, most recently from cac2045 to 98aab9c Compare April 29, 2026 20:13
@andyatmiami
andyatmiami force-pushed the test/e2e-cypress-tests branch 2 times, most recently from db15e3d to 3f74a3c Compare May 22, 2026 02:52
@andyatmiami andyatmiami changed the title Test/e2e cypress tests ci: define basic e2e tests May 22, 2026
@andyatmiami
andyatmiami force-pushed the test/e2e-cypress-tests branch 4 times, most recently from b7aed52 to 624922e Compare May 22, 2026 03:44
Add a self-contained Cypress e2e test suite under testing/e2e/ that
validates core user workflows against a real Kubernetes cluster. The
suite runs two specs: a user creating a Workspace through the wizard,
and an admin creating a WorkspaceKind via YAML upload.

Kubernetes environment setup (namespace, RBAC, seed data) is handled
programmatically via @kubernetes/client-node in Cypress plugin tasks
rather than shell scripts and static YAML manifests. A global before()
hook calls setupE2e() before any spec runs, making the test project
self-contained with all dependencies co-located. The JupyterLab
WorkspaceKind seed data references the controller's sample YAML
directly to avoid maintaining duplicate fixtures.

Authentication is simulated by injecting the kubeflow-userid header
via cy.intercept(), with separate loginAsAdmin and loginAsUser helpers
that map to distinct RBAC policies (cluster-scoped admin vs
namespace-scoped user).

Custom Cypress commands (k8sGet, k8sDelete, k8sWaitForResource) provide
a thin wrapper over the Kubernetes API for in-test assertions and
cleanup. Each spec deletes resources it creates in afterEach() hooks.

Page objects encapsulate UI interactions for the workspaces list,
workspace creation wizard, workspace kinds list, and workspace kind
creation form.

The CI workflow deploys all three components (controller, backend,
frontend) to a Kind cluster with Istio and cert-manager, runs a sanity
check to verify endpoints respond, then executes Cypress with the
gateway port-forwarded. The frontend is built in standalone deployment
mode via .env.production.local so it serves without the central
dashboard. Test artifacts (videos, screenshots) are uploaded on failure.

The Makefile provides an `e2e` convenience target that chains
setup-cluster, deploy-all, sanity-check, and local-e2e for local
development.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Andy Stoneberg <astonebe@redhat.com>
@andyatmiami
andyatmiami force-pushed the test/e2e-cypress-tests branch from 624922e to 48df9ca Compare May 22, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant