Show DATUM login credentials and document complete app launch requirements
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user