Expand scoped demo analysis access
This commit is contained in:
@@ -65,19 +65,19 @@ describe('useWorkbenchBootstrap', () => {
|
||||
expect(state.loadExports).toHaveBeenCalledWith('project-1')
|
||||
})
|
||||
|
||||
it('keeps the guest bootstrap inside the read-only demo surface', async () => {
|
||||
it('loads the same analysis catalog and project results for a guest', async () => {
|
||||
const state = { ...options('project-1'), restrictedMode: true }
|
||||
renderHook(() => useWorkbenchBootstrap(state))
|
||||
|
||||
await waitFor(() => expect(state.loadProjectData).toHaveBeenCalledWith('project-1'))
|
||||
expect(state.loadCapabilities).toHaveBeenCalledOnce()
|
||||
expect(state.loadQualityChecks).toHaveBeenCalledWith('project-1')
|
||||
expect(state.loadDetectionModels).not.toHaveBeenCalled()
|
||||
expect(state.loadSegmentationModels).not.toHaveBeenCalled()
|
||||
expect(state.loadDetectionRuns).not.toHaveBeenCalled()
|
||||
expect(state.loadSegmentationRuns).not.toHaveBeenCalled()
|
||||
expect(state.loadExports).not.toHaveBeenCalled()
|
||||
expect(state.loadDetectionResults).not.toHaveBeenCalled()
|
||||
expect(state.loadSegmentationResults).not.toHaveBeenCalled()
|
||||
expect(state.loadDetectionModels).toHaveBeenCalledOnce()
|
||||
expect(state.loadSegmentationModels).toHaveBeenCalledOnce()
|
||||
expect(state.loadDetectionRuns).toHaveBeenCalledWith('project-1')
|
||||
expect(state.loadSegmentationRuns).toHaveBeenCalledWith('project-1')
|
||||
expect(state.loadExports).toHaveBeenCalledWith('project-1')
|
||||
expect(state.loadDetectionResults).toHaveBeenCalledOnce()
|
||||
expect(state.loadSegmentationResults).toHaveBeenCalledOnce()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user