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

+22 -6
View File
@@ -475,8 +475,14 @@ describe('Non-owners cannot invite', () => {
describe('Error — a 500 or a network failure replaces the list with an alert and a retry', () => {
it.each([
{ name: 'a 500 response', failure: () => Promise.reject(new ApiError(500)) },
{ name: 'a network failure', failure: () => Promise.reject(new NetworkError()) },
{
name: 'a 500 response',
failure: () => Promise.reject(new ApiError(500)),
},
{
name: 'a network failure',
failure: () => Promise.reject(new NetworkError()),
},
])('shows the alert and recovers after Try again on $name', async ({ failure }) => {
await mountPage({ list: failure })
@@ -633,7 +639,9 @@ describe('Invite sent — a 201 closes the modal, adds a Pending row on top and
describe('Invite sent to an address whose invite had expired replaces the old row', () => {
it('keeps exactly one Pending row for the address, first', async () => {
await mountPage({ invite: () => Promise.resolve(inviteFixture('p.huber@gmail.com')) })
await mountPage({
invite: () => Promise.resolve(inviteFixture('p.huber@gmail.com')),
})
await openModal()
await submitWith('p.huber@gmail.com')
@@ -676,7 +684,9 @@ describe('Invite: already a user (409) — the field error depends on the respon
error: 'This address already has an account.',
},
])('shows "$error" for the body "$body"', async ({ email, body, error }) => {
await mountPage({ invite: () => Promise.reject(new ApiError(409, undefined, body)) })
await mountPage({
invite: () => Promise.reject(new ApiError(409, undefined, body)),
})
await openModal()
await submitWith(email)
@@ -733,12 +743,18 @@ describe('Invite: rate limited — a 429 shows a dialog alert and keeps the addr
describe('Invite: failed — a 500 or a network failure keeps the address and offers a retry', () => {
it.each([
{ name: 'a 500 response', failure: () => Promise.reject(new ApiError(500)) },
{
name: 'a 500 response',
failure: () => Promise.reject(new ApiError(500)),
},
{
name: 'a 500 with the API text',
failure: () => Promise.reject(new ApiError(500, undefined, FAILED_ALERT)),
},
{ name: 'a network failure', failure: () => Promise.reject(new NetworkError()) },
{
name: 'a network failure',
failure: () => Promise.reject(new NetworkError()),
},
])('shows the alert once on $name', async ({ failure }) => {
await mountPage({ invite: failure })
await openModal()