mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
feat: Add more Storybook stories for UI components
This commit is contained in:
@@ -58,11 +58,9 @@ vi.mock('firebase/auth', async (importOriginal) => {
|
||||
onAuthStateChanged: vi.fn(),
|
||||
signInWithPopup: vi.fn(),
|
||||
GoogleAuthProvider: class {
|
||||
addScope = vi.fn()
|
||||
setCustomParameters = vi.fn()
|
||||
},
|
||||
GithubAuthProvider: class {
|
||||
addScope = vi.fn()
|
||||
setCustomParameters = vi.fn()
|
||||
},
|
||||
setPersistence: vi.fn().mockResolvedValue(undefined)
|
||||
@@ -150,6 +148,13 @@ describe('useFirebaseAuthStore', () => {
|
||||
expect(store.loading).toBe(false)
|
||||
})
|
||||
|
||||
it('should set persistence to local storage on initialization', () => {
|
||||
expect(firebaseAuth.setPersistence).toHaveBeenCalledWith(
|
||||
mockAuth,
|
||||
firebaseAuth.browserLocalPersistence
|
||||
)
|
||||
})
|
||||
|
||||
it('should properly clean up error state between operations', async () => {
|
||||
// First, cause an error
|
||||
const mockError = new Error('Invalid password')
|
||||
|
||||
Reference in New Issue
Block a user