test(documents): add regression test for sort fallback to year grouping
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -104,6 +104,20 @@ describe('DocumentList – year grouping', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// ─── Sort fallback ────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
describe('DocumentList – sort fallback', () => {
|
||||||
|
it('falls back to year grouping when sort is not SENDER or RECEIVER', async () => {
|
||||||
|
const items = [
|
||||||
|
makeItem({ document: { ...makeItem().document, id: '1', documentDate: '2024-03-15' } })
|
||||||
|
];
|
||||||
|
render(DocumentList, { ...baseProps, items, total: 1, sort: 'TITLE' });
|
||||||
|
await expect
|
||||||
|
.element(page.getByTestId('group-header').filter({ hasText: '2024' }))
|
||||||
|
.toBeInTheDocument();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// ─── Sender grouping ─────────────────────────────────────────────────────────
|
// ─── Sender grouping ─────────────────────────────────────────────────────────
|
||||||
|
|
||||||
describe('DocumentList – sender grouping', () => {
|
describe('DocumentList – sender grouping', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user