fix: resolve E2E settings + badge navigation failures #52

Closed
ghost wants to merge 4 commits from fix/e2e-settings-name-and-badge-nav into main

4 Commits

Author SHA1 Message Date
Gandalf the Greybeard 57f3a59ae1 ci: add kubectl setup and kubeconfig configuration to E2E workflow
The deploy-plugin-to-headlamp.sh script requires kubectl to copy built
plugin files into the Headlamp pod. Install kubectl via azure/setup-kubectl
and configure kubeconfig from either a KUBECONFIG secret (base64-encoded)
or the in-cluster service account token.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-16 01:10:56 +00:00
Hugh Hackman ef73bf97fc ci: add plugin build+deploy steps to e2e workflow
Add build and deploy-plugin-to-headlamp.sh steps before Playwright
tests so E2E always tests the current commit's plugin code instead of
whatever was previously deployed to the Headlamp instance.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-16 01:02:54 +00:00
Gandalf the Greybeard 7e6661073d fix: add plugin deploy script and fix Dockerfile plugin directory
Root cause of E2E failures: the E2E tests run against a live Headlamp
instance but never deploy the current PR's plugin code. The deployed
plugin still uses the old registerPluginSettings name, so the settings
component never renders.

- Fix Dockerfile output directory from headlamp-polaris-plugin to
  polaris, matching the deployed plugin identity
- Add scripts/deploy-plugin-to-headlamp.sh to build and deploy the
  plugin to Headlamp via kubectl before E2E tests

The e2e.yaml workflow needs a matching update to call this script
before running Playwright (requires workflows permission).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-15 20:39:35 +00:00
Gandalf the Greybeard b3c4741eaf fix: match registerPluginSettings name to deployed plugin + fix badge nav URL
The settings component never rendered in E2E because registerPluginSettings
used 'headlamp-polaris' (and before that 'headlamp-polaris-plugin'), but
the deployed plugin directory is static-plugins/polaris — Headlamp identifies
it as 'polaris'. Changed to 'polaris' so the settings page can match the
registration to the correct plugin.

The badge click navigated to /polaris instead of /c/main/polaris because
Router.createRouteURL did not reliably resolve the cluster prefix from the
plugin context. Replaced with direct URL construction using K8s.useCluster().

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-15 20:22:31 +00:00