fix(#240): update test fixtures broken by rebase changes
Two backend tests passed a 6-element enrichment row but the rebase added summary_snippet as column 7 — added null at index 6 to both fixtures. Two frontend page.server tests mocked only 4 dashboard API calls but the page now makes 8 (3 Mission Control queues + weekly-stats added on this branch) — added the 4 missing mock responses. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1348,7 +1348,7 @@ class DocumentServiceTest {
|
||||
UUID docId = UUID.randomUUID();
|
||||
Document doc = Document.builder().id(docId).title("Brief an Anna").build();
|
||||
// chr(1)=\u0001 marks start, chr(2)=\u0002 marks end of highlighted term
|
||||
List<Object[]> rows = Collections.singletonList(new Object[]{docId, "\u0001Brief\u0002 an Anna", null, false, null, null});
|
||||
List<Object[]> rows = Collections.singletonList(new Object[]{docId, "\u0001Brief\u0002 an Anna", null, false, null, null, null});
|
||||
|
||||
when(documentRepository.findRankedIdsByFts("Brief")).thenReturn(List.of(docId));
|
||||
when(documentRepository.findAll(any(org.springframework.data.jpa.domain.Specification.class)))
|
||||
@@ -1381,7 +1381,7 @@ class DocumentServiceTest {
|
||||
Document doc = Document.builder().id(docId).title("Dok").build();
|
||||
// Simulate ts_headline output with sentinel markers around the matched word
|
||||
String snippetHeadline = "Hier ist der \u0001Brief\u0002 aus Berlin";
|
||||
List<Object[]> rows = Collections.singletonList(new Object[]{docId, "Dok", snippetHeadline, false, null, null});
|
||||
List<Object[]> rows = Collections.singletonList(new Object[]{docId, "Dok", snippetHeadline, false, null, null, null});
|
||||
|
||||
when(documentRepository.findRankedIdsByFts("Brief")).thenReturn(List.of(docId));
|
||||
when(documentRepository.findAll(any(org.springframework.data.jpa.domain.Specification.class)))
|
||||
|
||||
@@ -31,7 +31,14 @@ describe('home page load — dashboard mode', () => {
|
||||
data: { totalDocuments: 42, totalPersons: 7 }
|
||||
}) // stats
|
||||
.mockResolvedValueOnce({ response: { ok: true }, data: [{ id: 'd1' }] }) // incomplete
|
||||
.mockResolvedValueOnce({ response: { ok: true }, data: [{ id: 'd2' }] }); // recent
|
||||
.mockResolvedValueOnce({ response: { ok: true }, data: [{ id: 'd2' }] }) // recent
|
||||
.mockResolvedValueOnce({ response: { ok: true }, data: [] }) // segmentation-queue
|
||||
.mockResolvedValueOnce({ response: { ok: true }, data: [] }) // transcription-queue
|
||||
.mockResolvedValueOnce({ response: { ok: true }, data: [] }) // ready-to-read
|
||||
.mockResolvedValueOnce({
|
||||
response: { ok: true },
|
||||
data: { segmentationCount: 0, transcriptionCount: 0, readyCount: 0 }
|
||||
}); // weekly-stats
|
||||
vi.mocked(createApiClient).mockReturnValue({ GET: mockGet } as ReturnType<
|
||||
typeof createApiClient
|
||||
>);
|
||||
@@ -54,7 +61,14 @@ describe('home page load — dashboard mode', () => {
|
||||
data: { totalDocuments: 248, totalPersons: 34 }
|
||||
}) // stats
|
||||
.mockResolvedValueOnce({ response: { ok: true }, data: [] }) // incomplete
|
||||
.mockResolvedValueOnce({ response: { ok: true }, data: [] }); // recent
|
||||
.mockResolvedValueOnce({ response: { ok: true }, data: [] }) // recent
|
||||
.mockResolvedValueOnce({ response: { ok: true }, data: [] }) // segmentation-queue
|
||||
.mockResolvedValueOnce({ response: { ok: true }, data: [] }) // transcription-queue
|
||||
.mockResolvedValueOnce({ response: { ok: true }, data: [] }) // ready-to-read
|
||||
.mockResolvedValueOnce({
|
||||
response: { ok: true },
|
||||
data: { segmentationCount: 0, transcriptionCount: 0, readyCount: 0 }
|
||||
}); // weekly-stats
|
||||
vi.mocked(createApiClient).mockReturnValue({ GET: mockGet } as ReturnType<
|
||||
typeof createApiClient
|
||||
>);
|
||||
|
||||
Reference in New Issue
Block a user