mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-21 23:34:31 +00:00
fix: await needsLogin (#8340)
## Summary Add additional protection for bootstrap order issues. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8340-fix-await-needsLogin-2f56d73d365081c9b3c6d5a091c1eb8d) by [Unito](https://www.unito.io) --------- Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -42,10 +42,11 @@ vi.mock('@/platform/workflow/management/stores/workflowStore', () => ({
|
||||
}))
|
||||
}))
|
||||
|
||||
const mockNeedsLogin = ref(false)
|
||||
vi.mock('@/stores/userStore', () => ({
|
||||
useUserStore: vi.fn(() => ({
|
||||
initialize: vi.fn().mockResolvedValue(undefined),
|
||||
needsLogin: false
|
||||
needsLogin: mockNeedsLogin
|
||||
}))
|
||||
}))
|
||||
|
||||
@@ -65,6 +66,7 @@ describe('bootstrapStore', () => {
|
||||
beforeEach(() => {
|
||||
mockIsSettingsReady.value = false
|
||||
mockIsFirebaseInitialized.value = false
|
||||
mockNeedsLogin.value = false
|
||||
mockDistributionTypes.isCloud = false
|
||||
setActivePinia(createTestingPinia({ stubActions: false }))
|
||||
vi.clearAllMocks()
|
||||
|
||||
Reference in New Issue
Block a user