feat: sites and authors integration into existing screens (& formated all frontend files kinda accidentally)

This commit is contained in:
Florian Sylvain committed 2026-10-15 05:25:44 +02:00
1 parent 3d81d2c717
commit 6b8990c55e
239 files changed
+9194 -1354

No files matched your search

+13 -4
View File
@@ -317,7 +317,10 @@ describe('Authors form: linked user, choose', () => {
it('says so when every user already has an author', async () => {
const backend = createBackend()
backend.authors = authorsFixture().map((item, index) => ({ ...item, user_id: index + 1 }))
backend.authors = authorsFixture().map((item, index) => ({
...item,
user_id: index + 1,
}))
backend.users = backend.users.slice(0, 1)
await openAdd({ backend })
userTrigger().click()
@@ -444,7 +447,9 @@ describe('Authors form: avatar picker', () => {
expect(textOf(box())).toContain('face.jpg')
await submit('Save changes')
expect(callsTo(backend, 'PATCH', '/v1/author/7')[0]!.body).toEqual({ avatar_id: 55 })
expect(callsTo(backend, 'PATCH', '/v1/author/7')[0]!.body).toEqual({
avatar_id: 55,
})
})
})
@@ -482,7 +487,9 @@ describe('Authors form: role changed while open', () => {
describe('Authors form: deep link', () => {
it('opens the edit slide-over for an owner or admin', async () => {
await mountDirectory('authors', '/authors?edit=camille-roche', { role: 'admin' })
await mountDirectory('authors', '/authors?edit=camille-roche', {
role: 'admin',
})
expect(textOf(box())).toContain('Edit Camille Roche')
})
@@ -525,7 +532,9 @@ describe('Authors form: own author, any role, by deep link only', () => {
await typeInto(bioField(), 'Mine')
await submit('Save changes')
expect(callsTo(backend, 'PATCH', '/v1/author/2')[0]!.body).toEqual({ bio: 'Mine' })
expect(callsTo(backend, 'PATCH', '/v1/author/2')[0]!.body).toEqual({
bio: 'Mine',
})
})
it('opens the read-only detail for another author', async () => {