event photo wasserzeichen umgesetzt. Event admins können eigene einsetzen (als branding) falls das Paket es erlaubt. der Super Admin kann für die günstigen Pakete eigene Wasserzeichen erzwingen

This commit is contained in:
Codex Agent
2025-11-22 14:25:48 +01:00
parent eb41cb6194
commit 3d9eaa1194
25 changed files with 1124 additions and 71 deletions

View File

@@ -206,4 +206,71 @@ test.describe('Guest PWA limit experiences', () => {
await expect(page.getByText(/Galerie abgelaufen/i)).toBeVisible();
await expect(page.getByText(/Die Galerie ist abgelaufen\. Uploads sind nicht mehr möglich\./i)).toBeVisible();
});
test('blocks uploads and guest access once all limits are exhausted', async ({ page }) => {
await page.route(`**/api/v1/events/${EVENT_TOKEN}/package`, async (route) => {
const exhaustedAt = new Date().toISOString();
await route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({
id: 44,
event_id: 1,
used_photos: 120,
expires_at: exhaustedAt,
package: {
id: 90,
name: 'Starter',
max_photos: 120,
max_guests: 3,
gallery_days: 30,
},
limits: {
photos: {
limit: 120,
used: 120,
remaining: 0,
percentage: 100,
state: 'limit_reached',
threshold_reached: 120,
next_threshold: null,
thresholds: [80, 95, 120],
},
guests: {
limit: 3,
used: 3,
remaining: 0,
percentage: 100,
state: 'limit_reached',
threshold_reached: 3,
next_threshold: null,
thresholds: [2, 3],
},
gallery: {
state: 'ok',
expires_at: exhaustedAt,
days_remaining: 10,
warning_thresholds: [7, 1],
warning_triggered: null,
warning_sent_at: null,
expired_notified_at: null,
},
can_upload_photos: false,
can_add_guests: false,
},
}),
});
});
await page.goto(`/e/${EVENT_TOKEN}/upload?task=1`);
await expect(page.getByText(/Upload-Limit erreicht/i)).toBeVisible();
await expect(page.getByRole('button', { name: /Upload/i })).toBeDisabled();
await expect(page.getByText(/Limit erreicht/i)).toBeVisible();
await page.goto(`/e/${EVENT_TOKEN}/gallery`);
await expect(page.getByText(/Upload-Limit erreicht/i)).toBeVisible();
await expect(page.getByText(/Limit erreicht/i)).toBeVisible();
});
});