feat: add admin-web Docker build & push workflow with semantic-release #11

Merged
millianlmx merged 8 commits from feat/admin-web-docker into main 2026-07-19 16:10:08 +02:00
Showing only changes of commit 20f01899df - Show all commits

View File

@@ -91,8 +91,10 @@ describe('Sidebar', () => {
})
it('should handle logout errors gracefully', async () => {
mockSignOut.mockRejectedValueOnce(new Error('Network error'))
// Real supabase.auth.signOut() never throws — it resolves with { error }.
// Mocking it realistically avoids an unhandled rejection and matches prod behaviour.
mockSignOut.mockResolvedValueOnce({ error: new Error('Network error') })
render(<Sidebar />)
const logoutButton = screen.getByRole('button', { name: /logout/i })
@@ -101,6 +103,9 @@ describe('Sidebar', () => {
await waitFor(() => {
expect(mockSignOut).toHaveBeenCalled()
})
// Graceful: even when signOut errors, the user is still redirected to login.
expect(mockPush).toHaveBeenCalledWith('/login')
})
it('should have correct styling for navigation', () => {