Show DATUM login credentials and document complete app launch requirements

This commit is contained in:
yaya
2026-10-06 08:13:20 +01:00
parent 3fc37642cd
commit 2fad10c8de
6 changed files with 83 additions and 0 deletions
@@ -143,6 +143,22 @@ describe('useAppLauncherStore', () => {
expect(mockWindowOpen).not.toHaveBeenCalled()
})
it('shows DATUM generated credentials before opening its embedded UI', async () => {
mockRpcCall.mockResolvedValueOnce({
title: 'DATUM Gateway login',
credentials: [{ label: 'Password', value: 'fixture-only-password', sensitive: true }],
})
const store = useAppLauncherStore()
store.openSession('datum')
await vi.waitFor(() => expect(store.credentialPrompt.loading).toBe(false))
expect(store.credentialPrompt.show).toBe(true)
expect(store.credentialPrompt.credentials[0]?.value).toBe('fixture-only-password')
expect(store.panelAppId).toBeNull()
expect(mockWindowOpen).not.toHaveBeenCalled()
store.continueCredentialLaunch()
expect(store.panelAppId).toBe('datum')
})
it('gates a Home-style Portainer launch until its first-run token is shown', async () => {
mockRpcCall.mockResolvedValueOnce({
title: 'Portainer first-run token',
+1
View File
@@ -93,6 +93,7 @@ const NEW_TAB_APP_IDS = new Set([
* original synchronous user gesture. Portainer is dynamic (first-run only);
* File Browser and PhotoPrism have stable fallback credentials. */
export const CREDENTIAL_INTERSTITIAL_APPS = new Set([
'datum',
'filebrowser',
'photoprism',
'portainer',