Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

test(cloudcp): prove Pulse Account handoff continuity

rcourtman14d0d3e28239
diff --git a/internal/cloudcp/portal/dist/build_manifest.json b/internal/cloudcp/portal/dist/build_manifest.json
index fc7302ba29..87bacdae7a 100644
--- a/internal/cloudcp/portal/dist/build_manifest.json
+++ b/internal/cloudcp/portal/dist/build_manifest.json
@@ -1,5 +1,5 @@
{
- "source_hash": "ff17df3377ad8b87575ba85c1dcd1ef9b27b51b80298de843c03c4b87848e350",
+ "source_hash": "f26a39d5beef5f6fc0649b14f45a48c68df81e299b579087430cd05e42c810bd",
"build_inputs": [
"package.json",
"tsconfig.json",
diff --git a/internal/cloudcp/portal/frontend/src/app.test.ts b/internal/cloudcp/portal/frontend/src/app.test.ts
index c3777a02be..aad76ea690 100644
--- a/internal/cloudcp/portal/frontend/src/app.test.ts
+++ b/internal/cloudcp/portal/frontend/src/app.test.ts
@@ -137,6 +137,49 @@ describe('portal app', function() {
expect(runtime.store.getBootstrap().email).toBe('[email protected]');
});
+ it('preserves utility handoff intent across the signed-out to authenticated portal transition', function() {
+ var runtime = createPortalRuntime(
+ {
+ authenticated: false,
+ email: '',
+ public_site_url: 'https://cloud.pulserelay.pro',
+ accounts: [],
+ },
+ {
+ email: '[email protected]',
+ openPanelID: 'retrieve-service-panel',
+ }
+ );
+
+ var app = installPortalApp({
+ bootstrapDefaults: runtime.bootstrapDefaults,
+ store: runtime.store,
+ });
+
+ expect((document.getElementById('portal-login-email') as HTMLInputElement | null)?.value).toBe('[email protected]');
+
+ app.applyBootstrap({
+ authenticated: true,
+ email: '[email protected]',
+ accounts: [
+ {
+ id: 'acct_1',
+ name: 'Acme MSP',
+ kind: 'msp',
+ kind_label: 'MSP',
+ role: 'owner',
+ can_manage: true,
+ has_billing: true,
+ workspaces: [],
+ },
+ ],
+ });
+
+ expect(document.getElementById('retrieve-service-panel')?.classList.contains('visible')).toBe(true);
+ expect((document.getElementById('retrieve-inline-email') as HTMLInputElement | null)?.value).toBe('[email protected]');
+ expect(runtime.store.getServiceState().openPanelID).toBe('retrieve-service-panel');
+ });
+
it('completes the signed-out magic-link flow through the real shell and auth runtime', async function() {
var store = createPortalStore(bootstrapDefaults, {
authenticated: false,