fix(ci): repair Journey route registration and shared client behavior

Register the public view route, align generated entities and test fixtures, and share the scoped reads and access switches. Keep gallery and notification writes in order, and submit the email subscription from the dialog footer.
This commit is contained in:
Maurice
2026-11-30 17:32:50 +01:00
parent 6d14eb6677
commit 0c08a6dcb9
50 changed files with 531 additions and 417 deletions
+11 -12
View File
@@ -84,17 +84,11 @@ describe('journeyRecordingsApi', () => {
});
it('FE-API-JOURNEY-RECORDINGS-004: sends a GPX file with its fields and drops the day of one source (#3085)', async () => {
const sent: Array<{ file: string | null; date: unknown; utcOffsetMinutes: unknown }> = [];
const sent: Array<{ contentType: string | null; body: string }> = [];
const deleted: string[] = [];
server.use(
http.post(`${BASE}/import-gpx`, async ({ request }) => {
const form = await request.formData();
const file = form.get('file');
sent.push({
file: file instanceof Blob ? await file.text() : null,
date: form.get('date'),
utcOffsetMinutes: form.get('utcOffsetMinutes'),
});
sent.push({ contentType: request.headers.get('content-type'), body: await request.text() });
return HttpResponse.json({ days: [], untimedPoints: 0 });
}),
http.delete(`${BASE}/2026-05-14`, ({ request }) => {
@@ -112,10 +106,15 @@ describe('journeyRecordingsApi', () => {
await journeyRecordingsApi.remove(7, '2026-05-14', 'gpx');
await journeyRecordingsApi.remove(7, '2026-05-14');
expect(sent).toEqual([
{ file: '<gpx></gpx>', date: '2026-05-14', utcOffsetMinutes: '-300' },
{ file: '<gpx></gpx>', date: null, utcOffsetMinutes: null },
]);
expect(sent).toHaveLength(2);
for (const part of sent) {
expect(part.contentType).toMatch(/^multipart\/form-data;\s*boundary=/i);
expect(part.body).toContain('name="file"');
expect(part.body).toContain('<gpx></gpx>');
}
expect(sent[0]?.body).toMatch(/name="date"\s+2026-05-14/);
expect(sent[0]?.body).toMatch(/name="utcOffsetMinutes"\s+-300/);
expect(sent[1]?.body).not.toMatch(/name="(?:date|utcOffsetMinutes)"/);
expect(deleted).toEqual(['?source=gpx', '']);
});
});