feat(SPA): schema list and the sidebar Content group

This commit is contained in:
Florian Sylvain committed 2026-10-19 19:34:45 +02:00
1 parent 73a75d5cb9
commit 3c67cd2314
34 files changed
+2181 -18

No files matched your search

+7 -3
View File
@@ -230,6 +230,10 @@ afterEach(async () => {
await router.push('/login')
})
function shellFreeCalls(mock: { mock: { calls: unknown[][] } }) {
return mock.mock.calls.filter(([path]) => path !== '/v1/content-type')
}
describe('Route guards for /profile', () => {
it('renders ProfilePage for a resolved, verified session', async () => {
await mountApp()
@@ -287,7 +291,7 @@ describe('Default: the usual first visit with no display name', () => {
)
expect(resetButton().textContent?.trim()).toBe('Send reset link')
expect(byTestId('reset-note')).toBeNull()
expect(request).not.toHaveBeenCalled()
expect(shellFreeCalls(request)).toEqual([])
})
it('marks none of the eight navigation items as the current page', async () => {
@@ -364,7 +368,7 @@ describe('Editing: typing turns Save on', () => {
expect(footer().textContent?.trim()).toBe('Unsaved changes')
expect(footer().classList.contains('text-warning')).toBe(true)
expect(isEnabled(saveButton())).toBe(true)
expect(request).not.toHaveBeenCalled()
expect(shellFreeCalls(request)).toEqual([])
})
})
@@ -513,7 +517,7 @@ describe('Saved: a 200 updates the session, the chip, the footer and raises a to
title: 'Display name saved',
description: 'You now appear as Marta Alves across RenewCMS and in emails.',
})
expect(request).toHaveBeenCalledTimes(1)
expect(shellFreeCalls(request)).toHaveLength(1)
})
it('opens no leave confirmation when navigating away afterwards', async () => {