feat: roles SPA foundations

This commit is contained in:
Florian Sylvain committed 2026-10-27 22:21:12 +01:00
1 parent 80f7037d3a
commit 907949aa12
180 files changed
+4308 -835

No files matched your search

@@ -172,7 +172,7 @@ describe('The count cannot be loaded', () => {
it('shows the access page when the count answers 403', async () => {
await mountAt('/schema/events', { entries: failWith(403) })
expect(text(main())).toContain("You don't have access to Schema")
expect(text(main())).toContain("You don't have access to this page")
expect(nameInput()).toBeNull()
})
@@ -201,7 +201,7 @@ describe('Roles and sessions in edit mode', () => {
it('tells a verified user who is neither to go home, leaving the URL', async () => {
await mountAt('/schema/events', { role: 'user' })
expect(text(main())).toContain("You don't have access to Schema")
expect(text(main())).toContain("You don't have access to this page")
expect(button('Go to Home')).toBeInstanceOf(HTMLButtonElement)
expect(router.currentRoute.value.path).toBe('/schema/events')
expect(calls.filter((url) => url.includes('/entry'))).toHaveLength(0)